Imbedding an OR statement to connet with a list

Klarkin

New Member
Joined
Aug 14, 2018
Messages
8
I have a rule in column A to select a name from a dropdown list and I wish to add rules into column B that associates an hourly rate for each team member.

I've therefore used IF statements for example IFA2="Alan",40,0).This works fine but if I want to add two tea members with the same rate I was trying to use an OR statement and I am getting a#VALUE error.

For example =IF(OR(A2="Katie","Dave"),25,0)

All assistance gratefully received

KL
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try either
=IF(OR(A2="Katie",A2="Dave"),25,0)
or
=IF(OR(A2={"Katie","Dave"}),25,0)
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0
a) I'm moving this out of the Questions in Other Languages forum. It belongs in the main forum

=IF(OR(A2="Katie","Dave"),25,0)

b) Blech! :stickouttounge: I would refrain from using an IF statement at all. I'd put the pay rates elsewhere in a lookup table and fetch the rate using INDEX() and MATCH() or VLOOKUP(). This makes adding new people as simple as adding a row to your table. As it is now, any time you have a change in staff, you gotta rewrite your formula. Again -- blech!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top