Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change value in a cell based on value in another cell

Searched for this but could not find a way to do it.

I would like to be able to transform a value in one cell to another value in a different cell like this:

When cells in Column A contain Y set same number cells in Column B to Male or when cells in Column A contains N set same number cells in Column B value to Female.

For instance:

A2 = Y then B2 = Male
A2 = N then B2 = Female
like image 536
Eric Langley Avatar asked Dec 10 '13 02:12

Eric Langley


People also ask

How do I change the value of a cell based on another cell in Excel?

Click the cell where you want to enter a reference to another cell. Type an equals (=) sign in the cell. Click the cell in the same worksheet you want to make a reference to, and the cell name is automatically entered after the equal sign. Press Enter to create the cell reference.

How do I change cell value depending on another cell value?

For example: =$A2<$B2 - format cells or rows if a value in column A is less than the corresponding value in column B. =$A2=$B2 - format cells or rows if values in columns A and B are the same. =$A2<>$B2 - format cells or rows if a value in column A is not the same as in column B.

How do you pull a cell value based on another cell value?

In Excel, you can use the VLOOKUP function to quickly show value based on the corresponding value. D1 is the value you look up based on, A1:B7 is the data range you look for, 2 indicates to find the value in second column of the looking for range. Press Enter key, the value is displayed.

How do I change the text in a cell based on another cell?

Click the first cell in the range, and then drag to the last cell. Click HOME > Conditional Formatting > Highlight Cells Rules > Text that Contains. In the Text that Contains box, on the left, enter the text you want highlighted.


1 Answers

=IF(A2="Y","Male",IF(A2="N","Female",""))
like image 116
tigeravatar Avatar answered Oct 15 '22 02:10

tigeravatar