View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey Duke Carey is offline
external usenet poster
 
Posts: 1,081
Default Looking up multiple values and returning one corresponding val

=INDEX(Insp!A2:I300,MATCH('Data Sheet'!A2&'Data
Sheet'!B1,Insp!A2:A300&Insp!D2:D300,0))

OK, first part that you have as =INDEX(Insp!A2:I300

should be

=INDEX(Insp!G2:G300

since that is the column with the time remaining, right?

Next, the MATCH() portion - you said your Insp sheet had the S/N and Equip #
in columns A & B. If that is so, then that part of the formula should be

MATCH('Data Sheet'!A2&'Data Sheet'!B1,Insp!A2:A300&Insp!B2:B300,0)

If I've interpreted the column incorrectly, what you want to do is enter the
columns that contain the data you are looking up, in the same order that they
appear in the first part of the formula. So..if Datasheet A corresponds to
Insp A and Datasheet B corresponds to Insp C, you use

MATCH('Data Sheet'!A2&'Data Sheet'!B1,Insp!A2:A300&Insp!C2:C300,0)


"Flcnmech" wrote:

Added data... This is what I created from yours.

=INDEX(Insp!A2:I300,MATCH('Data Sheet'!A2&'Data
Sheet'!B1,Insp!A2:A300&Insp!D2:D300,0))

and

=INDEX(Insp!$A$2:$I$300,MATCH('Data Sheet'!$A$2&'Data
Sheet'!$B$1,Insp!$A$2:A300&Insp!$D$2:D300,0))

Both return - #VALUE! error instead of the value in the block associated
with that serial number and inspection.

"Flcnmech" wrote:

Okay, attempted to follow this but it just isn't working for me. Here is
what I have. On sheet 1 is all my data (A2 through I300). sheet 2 is where
I want to grab and post in a table. Column A is all the serial number, Row 1
is all the inspections. I want this to be able to take the value in A2 find
it and match its inspection in B1 with the time remaining on Sheet 1.

Sheet 1 columns are set up like this:

S/N Equip # Status Insp Total time Due time Time rem. Date
Due forecast usage

then the rows a

1 a good a 32156.0 55500.0
23344.0 aug 5, 2020 12 years

Thanks ahead of time.

"Duke Carey" wrote:

You can use an array formula, which is entered by pressing Ctrl-Shift-Enter

Assuming the:
- part# & machine# are in E1 and F1, and
- part# and machine# in your table are in columns A and B,
respectively, and
- the value you want to get back is in column C
use:

=INDEX(C1:C3,MATCH(E1&F1,A1:A3&B1:B3,0))

be sure to enter it correctly

"Nightrain" wrote:

I am wondering if it is possible to lookup multiple values using the vlookup
function and return one corresponding value? More specifically, I want to
lookup a part number and machine number and then return a value associated
with each of the two criteria. I have tried using nested vlookup functions,
but have yet to get anything to work properly. Any ideas? Thanks in advance.