Capture Values Based On Number Of Columns?

Jun 7, 2012

My data comes from 3 different sources

Source A = 4 columns (3rd one is important)
Source B = 8 columns (3rd one is important)
Source C = 5 columns (4th one is important)

Is there a slick way to capture values based on the number of columns in that row?

How To Capture First Number

Apr 5, 2014

I have excel formula which let for different numbers appear in the same cell,

=IF(OR(F7={10,10.5,11,11.512,12.5,13,13.5,14,14.5,15}),5,IF(OR(F7={15.5,16,16.5,17,17.5,18,18.5,19,19.5,20}),11,IF(OR(F7>=20.5),15,"")))

for example we have AS1 cell in which appear first number 15, then it change to 5, then it change to 15, then it change to 11 etc. What i need is to capture and lock just the first shown number (in this ex. it has to be 15) and put it to another cell (for ex. cell AT1) Maybe there is any formula ?

Capture A Target Number

Dec 12, 2009

I have a number result in a cell (d1) from a calcuting formula elswhere on the spreadsheet.

As the worksheet is constantly calculating the result in d1 keeps increasing and decreasing

I would like a formula in cell f3 that will give the result 1 if the d1 has reached the number 45. If cell d1 has not had the number 45 appear f3 will be 0

VBA - Capture Date As Number In The Script

Sep 23, 2008

I have a date in cell A1, eg 21/02/2008 being 21st Feb 2008 (yes i'm a pommie/limie)
This shows as a date in excel, but if I format the cell as a number, excel will display 39499
So Far, So Good.

Now, I wish the date format to remain in excel, but I wish my script to capture the number as 39499
Unfortunately it captures it as "21/02/2008".

How can I convert the captured value of "21/02/2008" to my desired value of "39499"
And be correct for any date encountered (within plus or minus 10 years only)

Formula To Capture All Values >=50 To <=99 In A Row

Feb 27, 2007

I would like a formula to capture all values >=50 to <=99 in a row.

Capture 2 Values From 2 Different Ranges

Feb 8, 2013

In my sheet, i have a list of machines in cells A2 to A5 & list of Plants in cells B2 to B5 as below

Col A..........Col B
Mach.........Plnt
A...............1
B...............2
C...............3
D...............4

What i want to capture is the last machine selected by clicking and also the value of the last plant selected by clicking
I want the machine last selected (clicked) to be in captured in cell D2 & the Plant last selected (clicked) to be in captured in cell D3.

i.e if i click Machine C in column A then go the column B and click Plant 4

Then D2 cell should show C and D3 should show 4

Look Across Values In 12 Columns, Return The Number Of Unique Values

Apr 17, 2009

I have 12 columns of data. In those 12 columns of data I have 3 digit numeric IDs. I want to count the unique number of IDs for each row. I have about 14K rows.

What would be the best way to do so?

Some rules about how the data is stored. I have 12 columns of data with anywhere from 1 to 12 columns having data for each respondent. Data always fills left to right and never skips columns.

I have attached an example file that represents how the data is stored and the output I would like (Unique Count).

Formula To Capture Values From One Sheet To Another

Nov 30, 2009

I have a spreadsheet that has two tabs that show different views of my report. In tab "Team View" I'd like to capture the information that is in "Cost Centre View" in the fields Nov09 to Oct10.

I want my formula in "Team View" tab to take the TOTAL "Run Rate Reduction" value in "Cost Centre View" ONLY and have the same "Initiative Type" in "Cost Centre View" that align to what is shown in "Team View" in column A (i.e. ISO).

I tried using a SUMPRODUCT but my formula didn't work.

Is there another formula that will give me this calculation?

Periodically Capture Cell Values

May 6, 2009

I would like to know how to capture a cell value at a specific date each month in a situation where this cell can change value as it is a formula. For example, the cell returns a percentage that is derived from other data that can change regularly. It may be 45% today, but a user may alter other data in the spreadsheet and it could be 67% tomorrow (or any other percentage).

I want to graph a monthly trend of how this cell value changes by capturing the cells value on the 20th day of every month, or it would also be ok to work on a periodic snapshot of every 30 days.

Capture The Averages (of Cells With Values)

Feb 15, 2007

I have a workbook with several sheets , the 1st 31 being named Mar.01-07, Mar.02-07,etc
I'd like to capture the averages(of cells with values) from cells B7:C24 of sheets Mar.01-07 thru Mar.31-07 and place the values in the sheet called "averages" with the average for B7 going to cell B7 in the "average " sheet, B8's average going to cell B8 in the "average" sheet and so on.

Count Unique Values In Column Based On Values In Other Columns

Mar 14, 2014

I'm running into an issue trying to calculate unique values in a Data column based on a few variables in other columns.

My current formula in Summary tab D4:D19 is
{=SUM(IF(FREQUENCY(IF(Data!\$I\$3:\$I\$66<\$E\$1,IF(Data!\$A\$3:\$A\$66=\$H\$1,
IF(Data!\$C\$3:\$C\$66=A4,ROW(Data!\$I\$3:\$I\$66)))),ROW(Data!\$I\$3:\$I\$66)),1))
+
SUM(IF(FREQUENCY(IF(Data!\$I\$3:\$I\$66<\$E\$1,IF(Data!\$A\$3:\$A\$66=\$I\$1,
IF(Data!\$C\$3:\$C\$66=A4,ROW(Data!\$I\$3:\$I\$66)))),ROW(Data!\$I\$3:\$I\$66)),1))}

This is currently counting the number of times a date value (data column I) appears for that name (A4:A19) in the data when meeting all of the conditions. I need it to instead count the number of times a unique date appears for that name with the additional conditions met (which all appear to work fine).

The results in the pink highlighted cells (Summary column D) should be:

Names starting with A - 3
All others - 2

I've left some other columns in the data with X's so that I can easily convert this back to my working spreadsheet.

Capture & Store Frequently Changing Values

Dec 9, 2006

I am useing Excel 2003 and OPC server client for excel, and i am monitoring 6 values, that are changeing each second. I was trying to make a function to collect this information, so i could form a statistic table, but unfortunally with no success.

I can watch how the values are changeing their numbers, but i cant sotre the values in the rows below. Does anyone know how can i do this

Generating Values In Number Of Cells Based On Adjacent Cell Values

May 22, 2014

What I have In Column B, I have the datesIn Column I, I have engineers name What I need I want a macro to generate Serial Nos. (1,2,3....... n) in column A If an only if the date in column B is today's date and the engineer's name matches with the PC's username

The following is my code

[Code] ....

Above code runs without errors but does nothing.

Insert Row (Based On Values In Range) With Sum Of Values For Other Columns

Apr 21, 2014

I have different reports, some have fifty transactions, others have thousands. My goal is to: Insert a new row every time the values in the "Account" column meet a certain criteria, AND THEN add the totals for the Debit and Credit Columns.

A
B
C
D
Dept
E
Account
T
F
F2
G
Debit
Credit
Total

33010

[Code] ....

I want to group the first four rows because Accounts 33010 and 33015 are in the same department. Same with 50050 and 500060. I want to then insert a row below the last row with "33015" as its Account #. And add the values for Debit and Credit. It'd look like this:

A
B
C
D
Dept
E
Account

[Code] .........

Honestly, I have tried everything. Running a Macros with Relative reference does not cut it.

Compressing Table To Capture Latest Instance Based On Each ID

Feb 6, 2012

I have a table that I am trying to compress to capture the latest instance based on each ID.

For example, let us say this is my data set:

ID___ | Name | Level_ | Score | Date
ID-32 | John | Beginr | 56.00 | 27-Jan
ID-33 | Jill | Beginr | 32.00 | 28-Jan
ID-34 | Bill | Beginr | 78.00 | 28-Jan
ID-34 | Bill | Interm | 39.00 | 29-Jan *
ID-33 | Jill | Beginr | 62.00 | 31-Jan
ID-32 | John | Interm | 61.00 | 02-Feb
ID-33 | Jill | Interm | 67.00 | 03-Feb *
ID-35 | Mike | Beginr | 82.00 | 03-Feb
ID-35 | Mike | Interm | 85.00 | 04-Feb
ID-35 | Mike | Advncd | 89.00 | 05-Feb *
ID-32 | John | Advncd | 24.00 | 05-Feb
ID-32 | John | Advncd | 52.00 | 08-Feb *

From this data set I wish to extract only the 4 entries with a "*" next to them. These entries give me the updated latest status for each student.

So the output table would look like:

ID___ | Name | Level_ | Score | Date
ID-32 | John | Advncd | 52.00 | 08-Feb
ID-33 | Jill | Interm | 67.00 | 03-Feb
ID-34 | Bill | Interm | 39.00 | 29-Jan
ID-35 | Mike | Advncd | 89.00 | 05-Feb

Capture And Calculate Data Based On Work Week In VBA Or Formulas

Jul 21, 2014

I have a requirements to capture the data and calculate the qty based on the defined work week. How to to this in vba macro or a formulas. I'll giving a sample data as reference. In my sample data i have already the formulas
but i wanted to automate the work week calculation specially if the number of days in a month has been change.

Btw, the values of every column is came from other worksheet. i copy paste this data as my sample.

For ex : Today is July and it has 31 days, the 31 days will be distributed to the defined workweek and calculate the contents of the corresponding column.

here is the distribution of columns per week as reference.

(31 days)
wk1 - Day1 to Day8 (8 colums)
wk2 - Day9 to Day16 (8 colums)
wk3 - Day17 to Day24 (8)
wk4 - Day25 to day 31 (7) columns

(30 days)
wk1 - Day1 to Day8 (8 colums)
wk2 - Day9 to Day16 (8 colums)
wk3 - Day17 to Day23 (7)
wk4 - Day23 to day 30 (7) columns

How To Calculate Even Distribution Between Two Values Over A Set Number Of Columns

Feb 17, 2014

I am in need of a formula to calculate the even distribution of values between two set values over a set number of columns. For example take a look at the attached screenshot. I have the numbers 2.88 and 2.44 and I need to fill in the empty cells between the two with with an even distribution of numbers in between the two (in descending order) over the 8 columns Screen-shot-2014-02-16-at-3.33.08-PM.jpg

Vary Columns Based On A Number

Feb 5, 2009

You can always add numbers together. however, how can you vary columns based on a number?

for example, i can always do things like the following to change the number of rows selected in a column based on the variable numRows.

Loop Based On Number Of Columns

Jan 10, 2014

I have a table of data (lets say A2:H30) i want to populate so i want the macro to loop based on how many columns i have? I am using this to post the data based on # of rows..

Sheets("Main Cal").Select Dim bottomA As Integer
bottomA = Range("D" & Rows.Count).End(xlUp).Row
Dim c As Range
Dim ws As Worksheet
For Each c In Range("D3:D" & bottomA)
Set ws = Nothing
On Error Resume Next
Set ws = Worksheets(c.Value)
On Error GoTo 0
If ws Is Nothing Then

Distribute Across Columns Based On Number

Dec 20, 2006

I have a list of parts with quantities that i would like to distribute among several columns that represent cities, based on the number of parts in stock. For Example, if i have 5 parts and ten cities, i want it to put one part in the first five. In the case where theres more parts than cities i want it to loop back to the first city and add one and so on. I attached a sample spreadsheet.

Counting Number Of Unique Values In Rows/columns

Mar 6, 2003

I have several columns in an excel sheet which contain values (eg. Names). The entered names can be unique or already exist in the column. I need to find out (using a function or macro) how many different names were entered. Duplicates shshould be ignored in the count.

Sum Up Values Based On Values From Two Columns

Jan 1, 2014

I have a budget spreadsheet as follows:

Category, Sub-Category, Amount
Food, Lunch, 10
Food, Dinner, 20
Food, Lunch, 15
Food, Dinner, 30

I need to track how much was actually spent on various categories and sub-categories, as follows:

Category, Sub-Category, Budget Amount, Actual Amount
Food, Lunch, 50, 25
Food, Dinner, 90, 50

Essentially, the actual amount contains a set of formula, that sums up the spending sheet (the one on top) based the category and sub-category on the budget sheet (the one on the bottom). Tried to use SUMIF but it seems to work on a single column.

Combine Two Columns Based On Name / Number And Score

Feb 19, 2014

I have three columns in the spreadsheet.

sheet1

A BC
Santhosh314
Praveen224
Praveen012
Praveen37
Santhosh38
Praveen120
Praveen036
Santhosh19

In another sheet (sheet2) output come like this.

A B
Praveen 3/7
Santhosh 3/8

Insert Rows Based On Number Of Columns Used

Jan 31, 2008

I have a spreadsheet which contains data needing to be re-formatted into a suitable format for my database. So far I have been doing this by hand, but want to make it quicker as I have over 2000 lines to sort out. I am trying to write a macro that determines whether there is data in the column next to the active one (D2), and if there is counts how many columns there is data in. Once it has done this it needs to insert the same number of rows as there are columns, then copy the column data and transpose it into the empty rows. My macro seems to work at first, but it exits after around the 4th row, but I can't work out why.

Sub split_For_Database()
Dim No_Of_Cells As Integer
Dim Start_Cell As Range
Dim Cell As Range
Dim LastRow As Range
Dim i As Integer
Dim lRows As Long
Set LastRow = Range("C65536").End(xlUp)
i = 0
Set Start_Cell = Range("C2")
Set Cell = Start_Cell
Do While Cell.Offset(0, 1) > 0
i = i + 1
Set Cell = Cell.Offset(0, 1)
Loop...................................

Finding Value Based On Two Values In Columns And One Value In A Row

Mar 19, 2014

A
B
C
D
E

[Code]...

In the example above I am trying to look up a value from columns C-E. I need to be able to search/index using 2 criteria to figure out which row to match with the given column. for example: If I want to know the invoice qty. for R&D for Jan-2012, so the returned value would be 13. I have tried several different combinations of match and index to get this to work but have had no success. Ultimately what I want to do is have a drop down for the month and year that our VP can select and it will give him the given values for that month.

Trying To Count Number Of Occurrences Based On Content Of Two Other Columns

Jan 30, 2014

I am working on a spreadsheet that will provide count of types of complaints for particular areas over a running time span. I have tried a multitude of formulas but not sure how to write any of them correctly. What I am trying to do is generate a count of area type by whether it is formal or informal. (i.e. I want to know if there are x formal finish issues vs. y informal finish issues and so on.) This information will get charted and be kept "real-time" user input.

Type
Description

Concern

Formal
Informal

[Code] ....

Hide/unhide Number Of Columns Based On Cell Value

Jul 17, 2007

If I have a value in A1 and run a macro [button], I want to have it hide a number of rows.

Each number is one column.

eg if A1 = 2 then B:C are visible, D:IV Hidden
if A1 = 3 then B:D are visible, E:IV Hidden
if A1 = 4 then B:E are visible, F:IV Hidden

up to 200 columns.

I tried it as a select case, but it is limited to just 22 cases which obviously not enough.

Comparing Two Columns And Returning Number Of Cells In One Column With Higher Values?

Apr 8, 2014

I have two Columns C and E that have dollar amounts in them. I want to compare each row in those columns and then total the number in column C that are higher that column E.

So basically C6>E6, C7<E7, C8=E8,C9>E9 should return the result of 2. There are two instances where the price in C is higher than the price in E.

Excel VBA To Sum Column Based On Values In Two Other Columns

Jul 9, 2014

I have successfully populated a website forms using Excel VBA. As a continuation of this task, i need to calculate the total of a column based on two other columns in the same worksheet.

Column A contains Date, column B contains 3 fixed alphabets (I, L and K) and column C contains time. I have attached a sample sheet here. sample.xls

How can i write a VBA code to find the sum of effort values of column C for each values in column B for a given date (value in column A).

Highlight Duplicate Values Based On 3 Columns?

Nov 8, 2012

I just want to colour duplicate values but want to do it with this Dictionary method

Code:
Sub highlight_Dups()
Dim cell As Range
Dim rng As Range
Dim dict As Dictionary

[Code]....