Need cell to equal another cell if certain criteria is met?

M

MLee

Need a function to make a cell equal certain numeric values if another cell
has certain text...any solutions?

Example:

If cell A1 equals Tom then this cell should equal the value in cell D1, if
Greg this cell should equal the value in cell D2...ect.

I would like to be able to enter 12 critera all causing the cell to equal
the values in 12 other cells.
 
M

Mike H

Hi,

With that many aoptions buils a table like this

Col c Col d
Tom 123
Pete 456
Me 789
You 112
Him 345
Us 457
Them 9876

The this form,ula in your cell looking at a1
=VLOOKUP(A1,C1:D7,2,FALSE)

It will look for the value in A1 in the table and return the value in Column D

Mike
 
R

reitanospa1

Using a VLOOKUP sounds like what you need.

First, build an alphabetic table that includes all the possibilities
F G
1 Al 105
2 Bob 612
3 Carl 884
....

Then, write the following formula where you want the answer displayed:
=VLOOKUP(B3,F1:G12,2) [Which translates to Lookup B3 in the table that
is in F1 to G12, and pick the answer in the second column]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top