IF STATMENT - IS THIS POSSIBLE???

CJ

Board Regular
Joined
Feb 22, 2002
Messages
77
Please could someone help me with an IF STATEMENT, to me it seems impossible, but after seeing some of the IF STATEMENTS queries solved lately on this FORUM. I thought I would give this one a try.
What I am trying to do is this:

IF(C1&C2=”HOL”,”SICK”,”STUDY”, then the value of cell APRIL 02 B20)

IF NONE OF THE ABOVE APPLY THEN FOLLOW ON TO

IF(C1&C2=”UN-PAY”,”FLEXI”, then the value of 00:00)

IF NONE OF THE ABOVE APPLY THEN FOLLOW ON TO

C2-C1

I’m desperate for an answer!!!!!!!!

CHRIS
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Not sure if I read this right, but try
=IF(AND(OR(C1={"hol","sick","study"}),OR(C2={"hol","sick","study"})),B20,IF(AND(OR(C1={"un-pay","Flexi"}),OR(C2={"un-pay","Flexi"})),0,C2-C1))

Note:

This produces an error if say C1 is HOL and C2 is flexi
 
Upvote 0
Hi Chris,

Try,

=IF(AND(OR(C1={"HOL","SICK","STUDY"}),OR(C2={"HOL","SICK","STUDY"})),'APRIL 02'!B20,IF(AND(OR(C1={"UN-PAY","FLEXI"}),OR(C2={"UN-PAY","FLEXI"})),0,C2-C1))

Unsure if this will work. What happens if the person goes home sick at midday for instance. You want to be able to pay them for the half day and pay them for the half sick day, right?

Need a few more specifics how you are handling the others scenarios.

HTH,
Jay
 
Upvote 0
Hiya,

If I interpreted correctly you want the OR statement:

=If(OR(C1&C2="HOL",C1&C2="Sick",C1&C2="Study"),B20,IF(OR(C1&C2="UN-PAY",C1&C2="FLEXI"),00:00),c2-c1))

Hope that helps out.
Adam
 
Upvote 0
Thanks IML & JAY & ADAM

I will now test out out all 3 solutions

CHRIS
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,243
Members
448,555
Latest member
RobertJones1986

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