PDA

View Full Version : Excel help



Thiel
2009-01-12, 02:22 PM
I'm working on an Excel spreadsheet and I've run into a problem.
I need a way to make field B display one of a number of predetermined values depending on what value is entered in field A.
For example:
A=5 B=27
A=3 B=42
A=1 B=6002

Pyrian
2009-01-12, 02:32 PM
This is what lookups are for. Look at the help for the LOOKUP, HLOOKUP, and VLOOKUP functions.

snoopy13a
2009-01-12, 02:34 PM
Use the IF formula:

=IF(A1=5,27,IF(A1=3,42,IF(A1=1,6002,A1)))

Basically, If A1=5 then it changes it to 27 in B1. If not, it uses the false statement which is IF A1=3 then 42. It then goes from there to if A1= 1 then 6002. If it doesn't match any of this, it reports A1.

tcrudisi
2009-01-12, 02:41 PM
This is what lookups are for. Look at the help for the LOOKUP, HLOOKUP, and VLOOKUP functions.

Snoopy's method works, but Pyrian's is definitely better. For a quick reference on how to use VLOOKUP visit the following site:

http://office.microsoft.com/en-us/excel/HP052093351033.aspx

Thiel
2009-01-12, 03:31 PM
Thanks a lot for the help.

SMEE
2009-01-12, 03:56 PM
This is what lookups are for. Look at the help for the LOOKUP, HLOOKUP, and VLOOKUP functions.

Words of wisdom. Get to know those functions. They will be very useful in MANY situations.