If function help Newbie

Closed
Michael32744 Posts 2 Registration date Saturday August 6, 2016 Status Member Last seen August 6, 2016 - Aug 6, 2016 at 01:00 PM
fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 - Aug 7, 2016 at 07:21 PM
Ok here goes
doing a very large spreadsheet and need some help with the if function
If column a says A1 or B2 or C2 then columns D F G or what ever would have a set number in them.
Ex Column A says B2, then I want column C to say 3, and column d to say 5, and column e to say 2 etc, etc...
Please help
Related:

2 responses

fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 1
Aug 6, 2016 at 07:29 PM
If you only have a few options...
=CHOOSE(MATCH(A1,{"A1","B2","C3"},0),1,3,2)

If you have a bunch, make a small table showing the code and the vslue, then use vlookup()
Michael32744 Posts 2 Registration date Saturday August 6, 2016 Status Member Last seen August 6, 2016
Aug 6, 2016 at 10:56 PM
WOA!!! slow down there I am a newbie to this stuff spell it out please?
Michael
0
fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 1
Aug 7, 2016 at 07:21 PM
Did not mean to overwhelm you, and did not know your skill level, so I was waiting for you to reply.

So, you have a bunch of options?

Make a small table somewhere, with 2 columns, 1 with the option in the 1st column, and the value for that option in the 2nd column.

column Y...column Z
aa...1
bb...2
cc...3
dd...4

Once you have that, you can use VLOOKUP in the cell where you want the answer to be.

=vlookup(A1,$Y$1:$Z$4,2,0)
Assuming the option you want is in A1.

That translates to...
Find the contents of A1 in the range Y1:Z4, when you find it, give me the value of the 2nd column. The 0 tells excel you want an exact match