Excel 2019 lookup issue - excel-formula

I have a data table, I need to document the row number, column number and value. However, I have the value and row number but need a formula to get the column number.
I have attempted to use Lookup and match, with no success.

Related

Excel formula to return value of cell in column A based off the relative cell value in column B

I'm working on a spreadsheet that has order number's in column A and the associated dates in column B. I can seem to get a correctly functioning formula that will find the earliest date in column B and return the associated order number from column A.
I've tried using INDEX and VLOOKUP formulas and managed to get it to return a date using =MIN(IF(B$1:B$99,A$1:A$99,"")) but when reversed it only returns the lowest order number.
=MIN(IF(B$1:B$99,A$1:A$99,""))Returns lowest date or lowest order number.
I need the order number associated with the earliest date
This should do it:
=INDEX(A1:A10,MATCH(MIN(B1:B10),B1:B10,0))
Used sample range for orders A1:A10 and dates B1:B10. Just change accordingly.

VLOOKUP value not available to formula or function but it should be

I am using the following formula:
=VLOOKUP(E9, 'Raw data'!$A$1:$I$45857, 9, FALSE)
I have two tabs and I want one column in my first sheet to lookup the # value found in 'raw data' associated with the ID number found in column E (data begins on cell E9). my second tab, 'raw data', includes that same field as found starting on E9 in sheet 1 within the data range A1:I45857. The column I want returned from 'raw data' is the 9th column. I want to be exact matches only.
What I think excel is thinking - look for e9 in the array 'raw data' and when I see it, return the value that I find in the 9th column of that row within array 'raw data'.
What excel is saying - A value is not available to the formula or function
I am confused because the value is in fact available within that array. when I filter and search for just one of the IDs, I find it in both sheets. The data type is number for both columns and there are no rogue spaces or anything...
My goal is ultimately to take a subset of ids and look at the difference between the # found on sheet1 and the number found on 'raw data'. I am Vlookup-ing so that i can grab the # value on 'raw data, set it right next to the # i am comparing it to on sheet1 and then I can pivot the data to aggregate both of those numbers based on ID and create a calculated field showing the % difference between the two.
Any input on how to fix my vlookup or a workaround to join my # from 'raw data' to sheet1 based on a common ID is MUCH appreciated.
I recommend that you look into the combination of INDEX & MATCH, rather than VLOOKUP, for situations like this. VLOOKUP has 2 main flaws: (1) you have to order your data so that your search term is the left-most column of a continuous data block [as you have just seen]; and (2) it is volatile, meaning that when a column is inserted within your data block, it will no longer properly 'count' the number of columns to move to retrieve your data.
MATCH is like half of VLOOKUP. You give MATCH a specific column or row, and a value to search for, and it will simply return the number of cells in it had to move to find that value.
=MATCH(A1,B:B,0)
This says 'look at B:B, and tell me what row the value of A1 appears on'.
INDEX is like the other half of VLOOKUP. You give INDEX a group of cells (either a row, column, or a 2D range), and a specific row number (plus potentially a column number), and it will return the value for that cell.
=INDEX(C:C,5)
This gives you the value of cell C5, which is the 5th row found in the column given to INDEX. Combine these two formulas and it will return the value of column C, where column B matches A1:
=INDEX(C:C,MATCH(A1,B:B,0))
This formula gives an identical result to
=VLOOKUP(A1,B:C,0)
VLOOKUP looks simpler here, but INDEX & MATCH is much more versatile - in your case, you wouldn't have needed to reorder your data to get it to work, you could have used the formula:
=INDEX('Raw Data'!I:I,MATCH(E9,'Raw Data'!E:E,0))
Once you get into the habit of using INDEX / MATCH over vlookup, you will find that your data is a lot more flexible to manage.
Got it to work by making my ID field in 'raw data' the leftmost column.
You don't need to start the Vlookup in column A. If the ID column is not in column A, Vlookup can still work, as long as the ID column is to the left of the column you want to return. So, if you want to return the value from column I, and the ID column is in column F, you can leave the table as it is and change the Vlookup to
=VLOOKUP(E9, 'Raw data'!$F$1:$I$45857, 4, FALSE)
This will look for the match in column F and returns the value from the fourth column, which is column I.

Excel vlookup return not available

i want to fill the name column using vlookup, here is my transaction table
and here is my master file
yes, they're the same number, but why do my vlookup doesn't return the corresponding name based on looked up value ?
does vlookup comply with data type ? like text, or number, or general ?
i have changing the data type, over and over, and return the same "Not Available"
is there anything wrong with my excel 2007 ?
You should use Index/Match like this:
=INDEX(Phonebook!$A$2:$A$45,MATCH(B2,Phonebook!$B$2:$B$45,0))
Your Vlookup doesn't work, because it tried to find value from B2 in first column of range Phonebook!$A$2:$B$45, i.e. Phonebook!$A$2:$A$45
What's wrong is that VLOOKUP is looking for the phone number in the first column, meaning in column A. For 'backwards lookup', you will need to use INDEX and MATCH:
=INDEX(Phonebook!$A$2:$A$45,MATCH(B2,Phonebook!$B$2:$B$45,0))
INDEX is as follows:
=INDEX(Range, Row Number, [Column Number])
It will return the value a cell from the range Range that is on the row number Row Number and column Column Number. I have put Column Number between square brackets because it is optional (you have only 1 column if you have a range that is within A:A for example)
To get the row number, you can use MATCH like the above. It works a bit like VLOOKUP, but instead of returning the value of the matching cell, it returns the row number of the matching cell (or column number if you use it on a horizontal range).
MATCH(B2,Phonebook!$B$2:$B$45,0) thus looks for B2 in the range B2:B45 of the worksheet Phonebook (0 stands for exact match) and gives the row number.
Then, you tell Excel to return the value of the cell from the range Phonebook!$A$2:$A$45 and row number obtained from MATCH.

Select cell above last cell of column

I want to automatically select a cell 12 rows higher than the last cell of data in a column. I used the tips in this thread (excel function to find last number in column) to automatically select the last cell of data using Lookup(9.99E+307,A1:A1000), but I am having trouble selecting the cell 12 rows above that. Would ADDRESS work for this? Any help is appreciated.
You can use INDEX and MATCH:
=INDEX(A1:A1000, MATCH(9^99, A1:A1000)-12)
MATCH works a little like LOOKUP, but instead of returning a value, it returns the row number where there was the last number. INDEX picks this row number up and returns the value in that particular row, minus 12.

Excel Formula - Column SUM where two columns match values

I have a table where I need to obtain the sum of one column where the values in two other columns match specific criteria.
What I need would be the sum of the Value column where the customer name matches Customer A and the Order Status matches Complete. For this example the result would be £150.00
I am using Excel 2007.
SUMIFS is available in 2007+
first parameter is what values to sum, the subsuiquent pairs are the range and their criteria.
For your example, it would be
=SUMIFS(D:D,A:A,"Customer A",C:C,"Completed")
You could also summarize the whole table using a pivot table.

Resources