Nested IF/And/OR function with multiple conditions

Cazbanana

New Member
Joined
Nov 1, 2018
Messages
4
Hi,

First time here. I have a query with dates and if functions. Not sure if this is possible but need some guidance to see if this is actually possible with so many conditions;

If the date in G is sooner than J than this field should be the difference of the 2 dates in days * D (D is a number)

If the date in G is later than J this field should be blank

If the date in G = J than this field should be 5 * D

If there is no date in J than take the date from N and follow these rules

If the date in G is sooner than N than this field should be the difference of the 2 dates in days * D

If the date in G is later than N this field should be blank

If the date in G = N than this field should be 5 * D

Thanks in advance!

Caz. :)

<tbody>
</tbody>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
as explained above if G<J then difference x D
G<N then difference x D

you cannot have both as they are different
 
Upvote 0
check if formula in Col K met your requirement


Book1
DEFGHIJK
11001/11/201829/10/2018 
21001/11/201801/11/201850
31001/11/201807/11/201860
41001/11/201829/10/2018
51001/11/201804/11/201830
61001/11/201802/11/201810
71001/11/201806/11/201850
81001/11/201808/11/201870
91001/11/201830/10/2018
101001/11/201825/10/2018
Sheet2
Cell Formulas
RangeFormula
K1=IF(G1="",IF(N1J1-N1)*D1,IF(N1>J1,"",5*D1)),IF(G1J1-G1)*D1,IF(G1>J1,"",5*D1)))
 
Upvote 0
Hi Andy,

Thank you so much for your speedy reply!!

Jiggled some of the cell references around, but it worked a treat!

Caz x
 
Upvote 0
you're welcome.
btw, it's Alan
 
Upvote 0
typos

as explained above if G<j then="" difference="" x="" d
< J then (j-g)*d
<n then="" difference="" x="" d
if g < n then (n-g)*d
you cannot have both as they are different - you have to prioritise them</n></j>
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

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