I've only worked with Excel for a few months now. There are errors in my formula and would be pleased if an experienced guru could guide me along.
Here's the entire formula ... and below is a breakdown of what I want it to do:
=IF(OR(ISBLANK(B5), ISBLANK(C5)), "", IF(OR(A5="CH",A5="LH",A5="PH",A5="EH"), 0.5*(C5-B5+1)), IF(OR(A5="CO",A5="LV",A5="PD",A5="ED"), C5-B5+1)), IF(OR(A5="HC",A5="HL",A5="HP",A5="HE"), AA5" Hrs"))
-----------------------------------------------
=IF(OR(ISBLANK(B5), ISBLANK(C5)), "",
SAYS: HEY! If either cells B5 or C5 are blank ... then leave this one blank too!
IF(OR(A5="CH",A5="LH",A5="PH",A5="EH"), 0.5*(C5-B5+1))
SAYS: If codes "CH, LH, PH, or EH" are in cell A5 ... then C5-B5+1 X 0.5
IF(OR(A5="CO",A5="LV",A5="PD",A5="ED"), C5-B5+1)),
SAYS: If codes "CO LV, PD, or ED" are in cell A5 ... then C5-B5+1
IF(OR(A5="HC",A5="HL",A5="HP",A5="HE"), AA5" Hrs"))
SAYS: If codes "HC, HL, HP, HE" are in cell A5 ... then just get the total from cell AA5 and put it here with the word "Hrs" after it.
-----------------------------------------------
Aside from whatever is preventing it from working ... my code could use some cleaning to make it more effecient ... but it's easier for me to follow this way.
Cheers!
Here's the entire formula ... and below is a breakdown of what I want it to do:
=IF(OR(ISBLANK(B5), ISBLANK(C5)), "", IF(OR(A5="CH",A5="LH",A5="PH",A5="EH"), 0.5*(C5-B5+1)), IF(OR(A5="CO",A5="LV",A5="PD",A5="ED"), C5-B5+1)), IF(OR(A5="HC",A5="HL",A5="HP",A5="HE"), AA5" Hrs"))
-----------------------------------------------
=IF(OR(ISBLANK(B5), ISBLANK(C5)), "",
SAYS: HEY! If either cells B5 or C5 are blank ... then leave this one blank too!
IF(OR(A5="CH",A5="LH",A5="PH",A5="EH"), 0.5*(C5-B5+1))
SAYS: If codes "CH, LH, PH, or EH" are in cell A5 ... then C5-B5+1 X 0.5
IF(OR(A5="CO",A5="LV",A5="PD",A5="ED"), C5-B5+1)),
SAYS: If codes "CO LV, PD, or ED" are in cell A5 ... then C5-B5+1
IF(OR(A5="HC",A5="HL",A5="HP",A5="HE"), AA5" Hrs"))
SAYS: If codes "HC, HL, HP, HE" are in cell A5 ... then just get the total from cell AA5 and put it here with the word "Hrs" after it.
-----------------------------------------------
Aside from whatever is preventing it from working ... my code could use some cleaning to make it more effecient ... but it's easier for me to follow this way.
Cheers!