Nested if statements

andie91

New Member
Joined
Feb 10, 2017
Messages
1
Hi everyone.

I would be grateful if you could help with the two questions below.
1) If I had two columns not adjacent to each other e.g. a1 and c1. If a1 and c1 had dates entered i.e. not blank, what function would I use to put a yes response in column d1, but also put in a no response in d1 if either a1 or c1 were blank.

2) if i had four columns e.g. a1 is a date for event 1, b1 is a time for event 1, c1 is a date for event 2 and d1 is a time for event 2. How can i calculate whether event 2 happened less than or equal to 20 minutes from event 1.

Thank you

<tbody data-remaining-comments-count="0" data-canpost="true" data-cansee="false" data-comments-unavailable="false" data-addlink-disabled="false" style="margin: 0px; padding: 0px; border: 0px;">
</tbody>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
1.

=IF(COUNT(A1,C1)=2,"yes","no")

2. Probably...

=IF(A1 = C1, IF(D1>=B1,D1-B11,0),0)>="0:20"+0<strike></strike>
 
Upvote 0
Don't think the 2nd one would work should time pass over a day. Maybe one of these depending on whether it matters which event needs to come first or not.

=(A1+B1-C1-D1)*1440<=20
=ABS(A1+B1-C1-D1)*1440<=20
 
Upvote 0

Forum statistics

Threads
1,215,972
Messages
6,128,017
Members
449,414
Latest member
sameri

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