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
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.
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.
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.
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.
=IF(A2="Y","Male",IF(A2="N","Female",""))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With