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;

[TABLE="width: 163"]
<tbody>[TR]
[TD="class: xl63, width: 163"]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. :)[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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
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,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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