PDA

View Full Version : Help with conditional values



gcapp
05-15-2013, 09:39 AM
I'm hoping that someone can help...

I have a spreadsheet with specific values in column A that should correspond with values in column B. So if there is a value in Column A (say 1), then the value in column B should be a certain value (say $100)

Example:
Column A Column B Column C Column D
1 $100 type in 2 how to get $500 to appear
2 $500
3 $1000


What I am looking for is if someone types in the value that exists in column A (say they type in the number 2 in column C) then the value that corresponds in column B ($500 in this case) will automatically appear in column D?

Hope this makes sense. Any input would really be appreciated.

mikerickson
05-15-2013, 03:25 PM
You might be looking for a formula like this in D1
=VLOOKUP(C1, $A$1:$B$100, 2, False)

gcapp
05-16-2013, 10:46 AM
mikerickson I appreciate the help!! One more question, is there a way to hide the formula show the #N/A doesn't show?? Obviously that disappears when a number is put into the column to the left, but now there are a bunch of the #N/A's showing on the page where no numbers have been entered.

Thanks

mikerickson
05-16-2013, 04:05 PM
IFERROR was created for that purpose. If your version of Excel doesn't have it, a contruction like.

=IF(ISNUMBER(VLOOKUP(...)), VLOOKUP(...), "")

is used.