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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,223,705
Messages
6,173,991
Members
452,541
Latest member
haasro02

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