ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   calculate a field based on value of another field (https://www.excelbanter.com/excel-discussion-misc-queries/183922-calculate-field-based-value-another-field.html)

dlb1228

calculate a field based on value of another field
 
i have a column with race information in it for example

black 1
white 2
asian 3
white 2

i would like to calculate the field next to it to a number for example if
its black then put a 1 in the cell, or white = 2, asian = 3

muddan madhu

calculate a field based on value of another field
 
use Vlookup function



On Apr 16, 6:21*pm, dlb1228 wrote:
i have a column with race information in it *for example

black * * 1
white * *2
asian * *3
white * *2

i would like to calculate the field next to it to a number for example *if
its black then put a 1 in the cell, or white = 2, asian = 3



Teethless mama

calculate a field based on value of another field
 
=(A1="black")+(A1="white")*2+(A1="asian")*3


"dlb1228" wrote:

i have a column with race information in it for example

black 1
white 2
asian 3
white 2

i would like to calculate the field next to it to a number for example if
its black then put a 1 in the cell, or white = 2, asian = 3



All times are GMT +1. The time now is 06:27 AM.

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