PDA

View Full Version : [SOLVED] Help with an If and OR Statement



LutonBarry
10-14-2015, 03:54 PM
Hello, I'm trying to apply a formula in Column M that will only run if the Cells in Column D contain "HARDWARE-XX-04" or "HARDWARE-UK-05".
The formula I have in Column M is =IF(D6="HARDWARE-XX-04",(NETWORKDAYS(K4,L6,Holiday)-1)*(WorkDayFinish-WorkDayStart)+MOD(L6,1)-MOD(K4,1)) which works but I cannot get my head round getting to run if the cell in Column D contains "HARDWARE-UK-05". The result by the way needs to be in minutes.

GTO
10-14-2015, 08:23 PM
Hi there,

Maybe:
=IF(OR(D20="HARDWARE-XX-04",D20="HARDWARE-UK-05"),(NETWORKDAYS(K18,L20,Holiday)-1)*(WorkDayFinish-WorkDayStart)+MOD(L20,1)-MOD(K18,1))

Hope that helps,

Mark

LutonBarry
10-14-2015, 10:54 PM
Hi there,

Maybe:
=IF(OR(D20="HARDWARE-XX-04",D20="HARDWARE-UK-05"),(NETWORKDAYS(K18,L20,Holiday)-1)*(WorkDayFinish-WorkDayStart)+MOD(L20,1)-MOD(K18,1))

Hope that helps,

Mark

Mark, Many thanks that works a treat. I can't remember what I did but I did try something similar just couldn't get it to work.