ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IF formula (https://www.excelbanter.com/excel-programming/438022-if-formula.html)

Joe

IF formula
 
i have columns that contain names of insurance companies followed by their
type. example
aetna grp
progressive pip
cigna wc

i would like to write a formula that would result in a 1, 2, or 3
corresponding to the type (grp, pip, wc)

i'm thinking the formula would read
'if this cell contains 'grp' = 1, 'pip'=2, 'wc'=3'

i cannot figure out how to write this formula

thanks MS group

JLGWhiz[_2_]

IF formula
 
=IF(B1="GRP",1,IF(B1="PIP",2,IF(B1="WC",3)))



"Joe" wrote in message
...
i have columns that contain names of insurance companies followed by their
type. example
aetna grp
progressive pip
cigna wc

i would like to write a formula that would result in a 1, 2, or 3
corresponding to the type (grp, pip, wc)

i'm thinking the formula would read
'if this cell contains 'grp' = 1, 'pip'=2, 'wc'=3'

i cannot figure out how to write this formula

thanks MS group




Mike Fogleman[_2_]

IF formula
 
See your 2nd post for a formula where name & type are in the same cell.

Mike F
"Joe" wrote in message
...
i have columns that contain names of insurance companies followed by their
type. example
aetna grp
progressive pip
cigna wc

i would like to write a formula that would result in a 1, 2, or 3
corresponding to the type (grp, pip, wc)

i'm thinking the formula would read
'if this cell contains 'grp' = 1, 'pip'=2, 'wc'=3'

i cannot figure out how to write this formula

thanks MS group




JLGWhiz[_2_]

IF formula
 
To avoid an error flag when the cell is blank, use this version:


=IF(B1="GRP",1,IF(B1="PIP",2,IF(B1="WC",3,"")))


"JLGWhiz" wrote in message
...
=IF(B1="GRP",1,IF(B1="PIP",2,IF(B1="WC",3)))



"Joe" wrote in message
...
i have columns that contain names of insurance companies followed by their
type. example
aetna grp
progressive pip
cigna wc

i would like to write a formula that would result in a 1, 2, or 3
corresponding to the type (grp, pip, wc)

i'm thinking the formula would read
'if this cell contains 'grp' = 1, 'pip'=2, 'wc'=3'

i cannot figure out how to write this formula

thanks MS group







All times are GMT +1. The time now is 03:00 AM.

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