If statement help??

mcintoshmc

Active Member
Joined
Aug 10, 2007
Messages
277
I created the below formula to calculate length of our hiring process. It will show pending, if the hire hasn't completed yet.

IF(R2="HIRED",IFERROR(DATEDIF(AF2,AV2,"D"),""),"PENDING")

Now, I want to account for hiring delays that are created by the candidate. Meaning, they're not looking to start for another 3 months, so I don't want this delay to skew our numbers. I created a delay column in AH. For the purposes of the above formula, AH2 will contain the letter "D".

I want the formula to return "DELAY" if AH2="D", "PENDING" if R2 doesn't ="HIRED", and the amount of days the hire took if both of aforementioned conditions are not met. I'm thinking this is a IF OR statement, but couldn't get it to work.
 
Last edited:

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try this maybe:
Code:
=IF(or(R2<>"HIRED",AH2="D"),IFERROR(DATEDIF(AF2,AV2,"D"),""),"PENDING")
 
Upvote 0
Wrap it in another IF function...

IF(AH2="D","DELAY",IF(R2="HIRED",IFERROR(DATEDIF(AF2,AV2,"D"),""),"PENDING"))
 
Upvote 0
Wrap it in another IF function...

IF(AH2="D","DELAY",IF(R2="HIRED",IFERROR(DATEDIF(AF2,AV2,"D"),""),"PENDING"))

This worked great! Now, how can I alter it, so that it will not show PENDING all the way down the spreadsheet because this will affect my pivot table.
 
Upvote 0
This worked great! Now, how can I alter it, so that it will not show PENDING all the way down the spreadsheet because this will affect my pivot table.

You're welcome.

I worked great but you don't want to show "Pending"? I don't know what that means.

If you want to ignore empty cells, test a key cell if it's empty

=IF(AV2 = "", "",IF(AH2="D","DELAY",IF(R2="HIRED",IFERROR(DATEDIF(AF2,AV2,"D"),""),"PENDING")))
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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