Assistance with vlookup formula in Excel

  oo7juk 19:38 18 Apr 2008
Locked

  RobCharles1981 19:40 18 Apr 2008

:-S

Explain your issue again please!!!

  oo7juk 19:43 18 Apr 2008

Apologies, pressed enter by mistake.


I want to know if the vlookup formula can look up 2 different sheets within the same workbook.

This is the code I am using at the moment:

=VLOOKUP(B6,Sheet2!A2:BC499,2,)

Would like to look up Sheet3 too.

Something like this:

=VLOOKUP(B6,Sheet2!&Sheet3A2:BC499,2,)

Thank you.

  daba 11:20 19 Apr 2008

VLOOKUP returns data from a specified column when a search criteria matches. A formula such as yours could result in 2 answers. What is the criteria for which answer is the right one ?

Possibilites are "lookup on sheet3 if a match is found on sheet2", "lookup on sheet3 if a match is NOT found on sheet2", "lookup on both sheets and give both answers", etc.

Explain more what you are attempting.

  VoG II 11:27 19 Apr 2008

You need a UDF click here

  oo7juk 23:10 20 Apr 2008

Unfortunately, the UDF didn't work. I am using a Vlookupnth formula with a code, so maybe that is where the conflict is.

Basically Sheet2 and Sheet3 are updated via userforms. Cell B6 is set up with data validation and contains a list of names. When I enter the data via userform1 it populates cell H6 and J6. When I enter data via userform2 it updates Sheet3, but I don't have a formula in cell H6 and J6 to look up Sheet3.

The name displayed in cell B6 should always display the same info e.g. Tom is always full time and works a 37 hour week.

But sometimes I will only enter data on to sheet2, and at the moment the formula works. If I enter on Sheet3 only then cell H6 and J6 will not be populated.

Thanks.

  VoG II 10:12 21 Apr 2008

=IF(ISNA(VLOOKUP(B6,Sheet2!A2:BC499,2,FALSE)),VLOOKUP(B6,Sheet3!A2:BC499,2,FALSE),VLOOKUP(B6,Sheet2!A2:BC499,2,FALSE))

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

The Evil Within 2 review-in-progress

InVision Studio takes on Adobe XD and Sketch

Camera tips to take better iPhone photos

Comment transformer un iPhone en borne Wi-Fi ?