VLookup With Dynamic Column And Row Header Locations
Jan 29, 2014
I'm trying to pull information in one spreadsheet (SS1) from another spreadsheet (SS2). I've found that the following works, except when SS2 is closed. Is there a way to do the following formula so that it will work even if SS2 is closed?
=VLOOKUP(A19,A:H,MATCH("Column Header",OFFSET(1:1,MATCH("Row Header",A:A,0)-1,0),FALSE),FALSE)
Link A19 is the lookup value
"Column Header" is the column header we want to find
"Row Header" is the unique row header for the headers of the table
The Column Header could appear anywhere in Column A to H, and the Row Header can appear on any row in the spreadsheet!
View 3 Replies
ADVERTISEMENT
Jun 21, 2013
I'm trying to calculate a figure in a report tab that reads off the data tab and looks for a specific column based on the header of that column. My explanation is admittedly poor but I've attached a sample file with an outline of what I'm trying to do which I hope makes things clearer.
Sample File.xlsx
View 2 Replies
View Related
Mar 30, 2012
I'm trying to get all subjects that are "pass" per student #.
Student #MathScienceHistoryStatisticsPhysical EducationHealthPhysicsEconomicsTrigonometryEngineering
5200309PASSPASSPASS5200306PASSPASSPASSPASSPASS5200307PASSPASSPASSPASSPASS
5200305PASSPASSPASSPASSPASS5200257PASSPASSPASS3046109PASSPASSPASSPASS3045539PASSPASSPASSPASS
3045613PASSPASSPASSEnter Student #
If I type student number here the result will be shown below with all subject passed.Subject Passed
View 9 Replies
View Related
Jul 5, 2013
Trying to copy records from one spreadsheet to multiple spreadsheets located in different directorates. Although I can create multiple Macros to address the need, I want to use ONE MACRO that utilizes two variables to represent:
1) The targeted file directory
2) The targeted file name
Items 1) and 2) are stated in two cells within the main spreadsheet and as you can already imagine, these values change IAW the name of the target file.
This is what I am trying to do:
File cell A1 = "C:ORLOAcquisition"
File cell A2 = "target.xlsx"
Basically replacing the code below
ChDir "C:ORLOAcquisition"
Workbooks.Open Filename:= "C:ORLOAcquisition arget.xlsx" , UpdateLinks:=3
with, ChDir ""A1"" Workbooks.Open Filename:= ""A2"" , UpdateLinks:=3
I was able to do it with target-spreadsheets located under the same workbook but my code does not work when trying to activate workbooks located in other directorates in the network.
View 2 Replies
View Related
Nov 18, 2011
I've been trying find an appropriate formula to extract the column header from a table in a different sheet if the row header and value in that table is known.
in the lookup table the row titles (column A) are product codes, column titles (row 2, D through AX) are business names and the table values are quantity.
In a different table I have product codes in column A and in column B i have the max number/quantity of products for that code. In column C i want to put the company name associated with the product and the number/quantity.
View 4 Replies
View Related
Aug 18, 2009
I have a Vlookup which I want to modify so that it can become dynamic as the table array part of the vlookup will change.
So the basic vlookup is as follows:
=VLOOKUP($R$3,ATTRIBUTION_FACTSET!$M$60:$P$73,2,0)
but the data I am looking for wont always be in the range M60:P73.
So I tried to make it dynamic by doing the following:
=VLOOKUP($R$3,INDIRECT("ATTRIBUTION_FACTSET"&"!M"&U1&":P"&V1),2,FALSE)
The idea being that U1 and V1 would be numbers that can change so in this case U1 would equal 60 and V1 would equal 73
This vlookup is giving me #N/A and no matter how I modify it I cannot get it to work.
View 3 Replies
View Related
Nov 1, 2011
I'm trying to do a vlookup but I want to be able to change the table array starting point depending upon a defined cell header. so
=vlookup(a1,sheet1!b1:c5,2,false) where b: would be defined by a header as
=vlookup(a1,sheet1!header name:header name+1,2,false).
So it will work much in the same way as match does for VLOOKUP
($A2,'Sheet 1'!$A:$FG,MATCH(AP$1,'sheet 1'!$1:$1,0),FALSE) but the array needs to change.
By doing this my vlookup will work automatically depending upon the header.
View 4 Replies
View Related
Apr 25, 2014
For column "B" count all the 1's if column header is equal to name in column A.
For Column "C" needs to be checked if a value was filled in column "I" if yes then check if in column "L" has a value, count all these values.
View 5 Replies
View Related
Jul 25, 2014
I am trying to write a formula where the column header of the row in which a value other than 0 exists, will display for each instance (row) where a value exists in an array spanning 3 columns. So the result cell could be any of the three column headers, or a combination thereof.
I started the formula in P2 of the GL Detail-2012 tab. File attached.
Here is what I started: =INDEX($M$1:$O$1,SUMPRODUCT(COUNTIF($M$2:$O$67756,))). Not working.
View 7 Replies
View Related
Sep 2, 2008
I need to create a dynamic range based on cell between a header and footer cell. The header cell ( A8 ) will remain static, however, the footer cell starts at A10 and then will move down as rows are added.
View 9 Replies
View Related
Jul 22, 2014
I would like to display the column header of the row in which a value other than 0 exists in a cell for each instance that value exists in an array spanning 3 columns. So the result cell could be any of the three column headers.
I started the formula in P2 of the GL Detail-2012 tab. (FILE TOO BIG)
Excerpt:
Resin Sand Eliminated Segment
- (12,896.65)-
- (6,570.85) -
- (11,503.80) -
- (13,188.50) -
If there is any value other than 0 in Resin, Sand or Eliminated columns, return that column's header under Segment.
Here is what I started: =INDEX($M$1:$O$1,SUMPRODUCT(COUNTIF($M$2:$O$67756,)))
View 2 Replies
View Related
Feb 7, 2014
I have the following sample data set and I'm trying to return the appropriate column header based on criteria (i.e. DDD) and a number value which will be somewhere within the range of the table. In example below, the value returned should be Header 2 because the value is greater than those in Header 1 column (range H9 to L26).
Here's data table:
CriteriaHeader 1Header 2Header 3Header 4
ZZZ5.0015.0050.00130.00
ZZ5.0015.0050.00130.00
Z5.0015.0050.00130.00
YYY5.0015.0050.00130.00
YY5.0015.0050.00130.00
Y5.0015.0050.00130.00
DDD5.0015.0050.00130.00
DD5.0015.0025.0075.00
D5.0015.0020.0065.00
RRR5.0015.0015.0045.00
RR2.5010.0010.0030.00
R1.503.0010.0025.00
UUU0.751.505.0020.00
UU0.751.505.0020.00
U0.751.505.0020.00
P0.751.505.0020.00
T0.100.105.0018.00
CriteriaNumberValue
DDD10.00Header 1>>>=INDEX($I$9:$L$9,MATCH(I29,INDEX($I$10:$L$26,MATCH(H29,$H$10:$H$26),)))
View 3 Replies
View Related
Mar 3, 2014
[Code] ......
This works, UNLESS "My Column Header" is the last column, or second to last column, then it jumps left two columns, instead of landing on the correct column.
The purpose of this script is to select a cell directly in that column that I was searching for.
View 2 Replies
View Related
Sep 18, 2012
I need a formula to return column header if there is data in the column, any data.But I also need to return the second, third, fourth header with data too
In column A row 2, I have =IF(M8"",$M$1,IF(N8"",$N$1,IF(O8"",$O$1,IF(P8"",$P$1,IF(Q8"",$Q$1,IF(R8"",$R$1,IF(S8"",$S$1,IF(T8"",$T$1,""))))))))
This returns the row 1 header for the first instance of data in row 2 columns M thru T But in B2, I need the second header with data in the column.
I need the results in yellow (1st, 2nd, 3rd, 4th) from the array to it's left
1St match2nd 3rd 4thColumn MColumn NColumn OColumn PColumn QColumn R
Column MColumn PColumn QData data2Data3
Column NColumn OColumn PColumn R Data Data2 data3 data4
Would use match/index but can't increment it to the second or 3rd match
View 2 Replies
View Related
Feb 9, 2009
I'm looking for a formula that will return the column header (a date) of the first instance of a number greater than 0. For example if columns A through S had dates as in row 1 (header row), and in row 2, every column contained a 0 up until column P, I would want the date (Row 1, Column P) returned? I think this might be a sort of index/match formula, but I am not very familiar with these.
View 3 Replies
View Related
Apr 29, 2009
I have a spreadsheet with several columns (all column names are in row 1).
I have 2 of column names. Note that their actual column# might change so the macro would have to look for the column name and NOT the column position ...
View 11 Replies
View Related
Jan 31, 2013
I would like to add the column header to each of the row item and price, we maintain masters in the matrix format, butthe application supports only the row item mapping with the customer and pricing. Attached excel file
View 2 Replies
View Related
Oct 28, 2008
I want to create dependent lists using data validation. The lists need to be created from ranges that will be growing as users add more data. I think the best way to create the list is a VLOOKUP. However, I am not sure how to use the VLOOKUP when the range is changing.
I have attached an example. I have a list on sheet "Vlookup" called "FRUIT" with "apple", "orange", "banana". Then to make the depedent lists I have created three other lists called: "APPLE", "ORANGE", "BANANA". I want to pull the COST from sheet "VALUES" into the lists "APPLE", "ORANGE", "BANANA". Users will be adding costs next to the FRUIT they purchase.
View 5 Replies
View Related
Aug 20, 2014
I'm trying to find a way to perform Vlookups against a dynamic range of data, where the number of rows/values in Col B is always subject to change.
The way that the workbook is structured is as follows:
Sheet1: Except for Cols A & B, this is a blank sheet. This is the sheet in which the vlookup values will need to fall into based on the number found in its' Column B
Sheet2: The sheet that contains the data that will be passed into Sheet1 via vlookup, and all of its Columns contain data.
So, basically, Sheet1 is a shell that needs to be filled with data copied over from Sheet2 based on vlookups against Col B.
The vlookups will need to be shifted back 1 column.
And examples of how the Vlookups need to work is:The value in Sheet2 [Col E], needs to get passed into Sheet1 [Col D]Along those lines:
The value in Sheet2 [Col F], needs to get passed into Sheet1 [Col E]
The value in Sheet2 [Col G], needs to get passed into Sheet1 [Col F]so on and so forth
So basically, all of the values passed into Sheet1 from Sheet2 need to be shifted back by 1 column until we reach the last Col (Col M in this file).
Where
The value in Sheet2 [Col M], needs to get passed into Sheet1 [Col L]
The number of columns will remain fixed, but again the number rows will vary week to week in both of the two sheets, so I would need to have a way of creating a Vlookup through VBA that accounts for the dynamic range in Col B.
View 4 Replies
View Related
Oct 14, 2011
The workbook I'm working on has several sheets: Totals, Monday, Tuesday, etc set into a SheetArray.
The problem is that I'm trying to perform a VLOOKUP on data in worksheet "Monday" against column A in worksheet "Totals". However, the size of column A will change as the codes iterates through the days. Therefore, I need the range of column A in the Totals worksheet to be dynamic.
Code:
'Find any new projects in the daily data that are not in the Totals.
DayProjCount = Range(Sheets(SheetArray(A)).Range("AA2"), Sheets(SheetArray(A)).Range("AA2").End(xlDown)).Cells.Count
ProjCell = 2
With Worksheets("Totals")
[Code].....
During this process, the code should only find 1 error in ValidProject. But, each are throwing errors. I think it's because the VLOOKUP isn't searching through the correct range, but I don't know how to check it.
View 2 Replies
View Related
Feb 24, 2012
I am trying to create a vlookup to get a count of trouble tickets techs completed daily within a table I created, I am using a table since its dynamic. For example I need to see how many tickets Joe completed in a day. See below...
Tech Ticket# Comments Status
Joe 1234 Replaced HD Closed
John 3212 Replace Motherboard Closed
Joe 5678 Installed OS Closed
Above is just an example (my table has 40 columns). I need to vlookup joe and get the count of the closed tickets.
View 6 Replies
View Related
Apr 10, 2012
I have a workbook with 100 worksheets. Each worksheet is setup the same way with dates down column A, and data in column B. In another sheet, I need to run a vlookup on the dates and data, but I need it to adjust for whatever spreadsheet name I give it. Is there any way to have the vlookup table array change as I change the worksheet it should reference?
View 2 Replies
View Related
Feb 9, 2010
I need a formula to lookup and retrieve data from a table of values. Given an EMP-ID in column A of the row that contains the formula and given a column name in row 1 of the column that contains the formula, I need to do a lookup. So, in effect, I am doing a lookup based on two values .. the column header and the row header.
I have attached a small model to illustrate what I need. Cell C-3 in the first worksheet will contain the formula to lookup and retrieve the value in cell C-7 in the second worksheet, based on the values in cell C-1 (column header = “Database Col 2”) and in cell A-3 (row header = “257”) in the first worksheet.
View 2 Replies
View Related
Sep 14, 2007
Is there a way to reference a column depending on its header? Is there a way of doing this without the need of surveying one-by-one all the column headers with a for loop? I need this cuz if I have a very dinamic program which moves columns arround and depending on the state of the program the position of a column can change.
View 2 Replies
View Related
Jan 15, 2008
Have a set of dates as column headers across a worksheet. Rows are product names. When a product is delivered, the cell is marked "delivered" for the date (in the column header) it was delivered. Need a formula that will look across each row (product), and return the date of the first cell with the value "delivered". I have: =INDEX(F19:AS19,1,MATCH("delivered",F19:AS19,0)) <for row 19. right now, but its just giving me "delivered" as the value and I cant figure out why.
View 2 Replies
View Related
Sep 30, 2013
I have this code which looks information in a table. The problem is that the table is getting every time bigger.
Here the code:
VB:
With Worksheets("Sheet10").Cells(9, 3).Resize(, LastColumnf - 2)
.Formula = "=IFERROR(CONCATENATE(VLOOKUP(Sheet10!C2,Sheet12!$A$10:$C$550,3,FALSE),""."",
VLOOKUP(Sheet10!C2,Sheet12!$A$10:$C$550,2,FALSE)),"""")"
.Value = .Value
End With
How can I write $A$10:LastNewRow... Another problem rises here, LastNewRow might end up being the oldLastNewRow, i think. But maybe since it is getting bigger, there is no problem, I don't know.
Instead of having a static reference like $C$550 I would like to have a dynamic one.
View 3 Replies
View Related
Jun 29, 2014
sample.xlsmI am trying to create a sheet with dynamic lookup based on selections.
So if a user selects planning or costing and then the state then click on search then it cell B13 it should lookup from data sheet and give full state name and in cell C13 give the document name and in D13 give the print rule.
If in the data sheet the document type says planning/costing and there is no corresponding state to that document then it should be incliuded in all searches.
When I click clear then it resets the search. So if i select Planning and state as AL then the display should be
Alabama ABC DEF
A12 AA1 (aligned to previous row)
C12 AA3 (aligned to previous row)
E12 AA5 (aligned to previous row)
Also is it a better option to do planning and costing as a radio button or drop down list. Is there a way in the state selections to show the drop down list arrow at all times. Currently when the cell is not selected it disappears.
View 10 Replies
View Related
Oct 10, 2005
I'm looking up a value from another workbook. Simple enough in itself, but
heres the thing.
I'd like to write a dynamic vlookup that checks the value of another cell to
find the table array for it to look up from.
Basically I have a table of data, the column headers are dates. I have a
report that is run daily that I need to look up from. Rather than implicitly
referencing each sheet I'd like to tell the vlookup to check the date in the
column header and use that for the sheet. The range inside of the sheets is
always the same.
View 15 Replies
View Related
Jul 14, 2014
I have the following issue I have a fixed value in column N this is vlooked up into a cell in the same row after a specific cell value (category):
Toilet
Category
X
Brush
Category
X
Handle
Category
X
Door
Category
X
Computer
Category
X
The table above shows that the initial column is fixed i.e Toilet, Brush etc however the X's are dynamic but they will always be placed after the word Category. I think a VBA solution is needed but I can't figure out how to do it.
View 2 Replies
View Related
Aug 27, 2009
I'm trying to create a dynamic Named Range using VLOOKUP in place of a sheet name. (Using Excel 2003 & Win XP Pro SP2).
To illustrate:-
Employees.xls contains employee's details on separate sheets for each department, e.g. Production, Admin, Sales, Personnel, etc. Each sheet is 12 cols. and 1 header row. Sheet 1 of this book contains a 2-column Master List of all employees and their departments. MyBook.xls has an employee's name in A1.
I can get his department by using =VLOOKUP(A1,MasterList,2,FALSE) and what I want to do is incorporate that into the following in place of 'Admin' so that the range will refer to the correct department for whoever's name is in A1.
=OFFSET('[Employees.xls]Admin'!$A$2,0,0,COUNTA('[Employees.xls]Admin'!$A:$A)-1,12).
View 9 Replies
View Related