#1   Report Post  
Posted to microsoft.public.excel.programming
Joe Joe is offline
external usenet poster
 
Posts: 476
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
extract formula result form cell without running formula again jason Excel Programming 0 August 6th 09 07:40 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 05:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"