Entering a value when 2 criteria are met - Please HELP!!!

SFCChase

Board Regular
Joined
Jun 25, 2013
Messages
113
Office Version
  1. 2016
Platform
  1. Windows
I'm trying to get a formula that will enter a particular value when 2 specific criteria are met. I've been trying to use an =IF(AND( statement, but so far I keep getting a "the formula you typed contains an error" message.

I need to have cell V9 return a value of 8 if the following conditions are met:
Cell D9 = "SG"
Cell H8 of a different workbook (Called Work Schedule) = 3

I would like the value of V9 to change to 12 if:
Cell D9 = "SG"
Cell H8 of 'Work Schedule' = 19

My formula now looks like this:
=IF(AND(D9="SG",'WORK SCHEDULE'!H8=3,8,IF(AND(D9="SG",'WORK SCHEDULE'!H8=19,12,""))))

But it won't work....what am i doing wrong???
 
Try
=IF(D9="SG", IF([WorkSchedule.xlsm]Sheet1!H8=3, 8, IF([WorkSchedule.xlsm]Sheet1!H8=19, 12, "SG, not WorkShed")), "neither")

I freestyled what the formula would show if the specified conditions aren't met.
 
Upvote 0
Try
=IF(D9="SG", IF([WorkSchedule.xlsm]Sheet1!H8=3, 8, IF([WorkSchedule.xlsm]Sheet1!H8=19, 12, "SG, not WorkShed")), "neither")

I freestyled what the formula would show if the specified conditions aren't met.


The formula gives me a "FALSE" value in the cell if H8 doesn't equal 3 or 19. is there a way to leave it blank?
 
Upvote 0
It's giving me a #REF error now....any other suggestions?
 
Upvote 0
Let me rephrase the original question as well......"Work Schedule" is off a different spreadsheet of the same workbook...it's not a new workbook entirely....not sure if that makes a difference.
 
Upvote 0

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