ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need cell to equal another cell if certain criteria is met? (https://www.excelbanter.com/excel-worksheet-functions/173523-need-cell-equal-another-cell-if-certain-criteria-met.html)

MLee

Need cell to equal another cell if certain criteria is met?
 
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.


Mike H

Need cell to equal another cell if certain criteria is met?
 
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
"MLee" wrote:

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.


[email protected]

Need cell to equal another cell if certain criteria is met?
 
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]


On Jan 17, 3:54 pm, MLee wrote:
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.




All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com