PDA

View Full Version : Solved: VLOOKUP Help



Lyconal
06-07-2008, 02:08 AM
Hi Guys, I hope you can help me please : pray2:

I have an excel spreadsheet that updates daily (Pre-Recorded Macro), but I want to be able to do another task on the data.

I have data populating cells C13 - C150, and I want it to display certain text in Cells A and B depending on the value in the C cell.

So if C13 cell had 'Test' in it, I would want Cell A13 to say 'This is a test' and cell B13 to say 'Please Enter a Value'.

I have it written in SELECT CASE, but it is 703kb long and will not run as it is far too large. It is so large because each C cell has a different value in it, and depending on that value, it must say something different in cells A and B.

Thanks for any help

..:: EDIT ::..

Title Changed to VLOOKUP HELP

mdmackillop
06-07-2008, 02:14 AM
Put your C values and corresponding text in a table on another sheet. Use VLOOKUP to return the corresponding values.

Lyconal
06-07-2008, 03:04 AM
Ok,

So i put them in a new sheet.
How do I use VLOOKUP to do this? (Tryed googling, and only got confused).

Cheers :)

mdmackillop
06-07-2008, 03:25 AM
Here's a simple sample

Lyconal
06-07-2008, 03:26 AM
I just figured it out :)

I have one last question - How do I get it to display nothing if the look-up returns nothing, instead of #N/A?

Thanks for all of your help so far, it is very much appreciated.

mdmackillop
06-07-2008, 03:29 AM
=IF(ISNA(VLOOKUP($C1,Sheet2!$A:$C,2,FALSE)),"",VLOOKUP($C1,Sheet2!$A:$C,2,FALSE))

Lyconal
06-07-2008, 03:36 AM
=IF(ISNA(VLOOKUP($C1,Sheet2!$A:$C,2,FALSE)),"",VLOOKUP($C1,Sheet2!$A:$C,2,FALSE))

Legend!!

Thank-You VERY much :)

Simon Lloyd
06-07-2008, 05:52 AM
Lyconal, we are glad that you found your solution here, if your question has been answered please mark your thread solved by using Thread Tools at the top of this window.