If's and named ranges.

NileUk

New Member
Joined
Jan 20, 2021
Messages
10
Office Version
  1. 2007
Platform
  1. Windows
Hi

I have a Cell B13 that is a DV list of labor types. I also have some named ranges in another sheet with the different labor costs in named ranges.

I'm trying to use a 'IF' formular in cell I13 to show the various cost's depending on the labor type chosen in the DV list in B13 as shown below but it keeps saying I have too many arguments!

Excel Formula:
=IF(AND(B13="Std Labour", "Extra Over Labour"),StdLabCost,0,IF(B13="OOH Labour",OOHLabCost,0, ))

I've created multiple IF statements befor and they worked fine, but now i'm using named ranges i'm not sure if this is the right formula to use.

Can you help.

Kind Regards

Nile
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Maybe
Excel Formula:
=IF(OR(B13={"Std Labour","Extra Over Labour"}),StdLabCost,IF(B13="OOH Labour",OOHLabCost,0))
 
Upvote 0
Fluff

I forgot to mention it was in a table. Added the table ranges and BINGO!

Excel Formula:
=IF(OR(tblEmpLabour[[#This Row],[Item Type]]={"Std Labour","Extra Over Labour"}),StdLabCost,IF(tblEmpLabour[[#This Row],[Item Type]]="OOH Labour",OOHLabCost,0))

Thanks once again.

Regards

Nile
 
Last edited by a moderator:
Upvote 0
Solution
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,744
Messages
6,180,696
Members
452,994
Latest member
Janick

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