# =if function (mutiples)

#### nkll

##### New Member
this should be easy (i think)

A1=can be equal to Coach, Player, Owner

B1 =if(A1="coach",1) if(A1="player",2) if(A1="owner"3)

My question is...how do you combine these "if" statements...use an "or" ????

any help is appriciated...thanks

### Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

#### Derek

##### Well-known Member
Hi there

try

B1 =if(A1="coach",1, if(A1="player",2, if(A1="owner",3,"")))

regards
Derek

#### Jay Petrulis

##### MrExcel MVP
Hi,

Try the following...

=IF(A1="Coach",1,IF(A1="Player",2,3))
=IF(A1="Coach",1,IF(A1="Player",2,IF(A1="Owner",3,"")))
=MATCH(A1,{"Coach","Player","Owner"})

#### Yogi Anand

##### MrExcel MVP
Hi nkll:

I think Jay's contribution using the MATCH function is very compact -- however I will use it with the 0 argument added -- as in ...

=MATCH(A1,{"Coach","Player","Owner"},0)

to get a corrsponding result of 1, 2, or 3 depending on whether the entry in A1 is Coach, Player, or Owner.

#### nkll

##### New Member
Jay Petrulis said:
Hi,

Try the following...

=IF(A1="Coach",1,IF(A1="Player",2,3))
=IF(A1="Coach",1,IF(A1="Player",2,IF(A1="Owner",3,"")))
=MATCH(A1,{"Coach","Player","Owner"})

Thanks.....=IF(A1="Coach",1,IF(A1="Player",2,3))
this worked

#### Jay Petrulis

##### MrExcel MVP
nkll said:
Jay Petrulis said:
Hi,

Try the following...

=IF(A1="Coach",1,IF(A1="Player",2,3))
=IF(A1="Coach",1,IF(A1="Player",2,IF(A1="Owner",3,"")))
=MATCH(A1,{"Coach","Player","Owner"})

Thanks.....=IF(A1="Coach",1,IF(A1="Player",2,3))
this worked

Just be careful on this one. If the cell is blank or has anything other than the options listed, this formula will default to 3.

Replies
3
Views
267
Replies
8
Views
118
Replies
7
Views
380
Replies
5
Views
89
Replies
0
Views
177

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,822
Messages
5,772,469
Members
425,760
Latest member
zj042060

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back