Jun 16 2020 11:35 PM
Hi all, new member here, been banging my head on the desk with this as I can't see why it isn't working.
Situation; If column J is equal to C, and column T is equal to value between 1 and 3, then take the earliest date in columns K:M and minus 1 month... I have this working as; =IF(AND(T6>=1, T6<=3, J6 = "C"),MIN(K6:M6)-30)
I am then trying to add in the caveat (on the same formula) for; if column J is not equal to C, and column T is equal to value between 1 and 3, then take the earliest date in columns L:M and minus 1 month, I have tried =IF(AND(T11>=1,T11<=3,J11="C"),MIN(K11:M11)-30),IFNOT(AND(T11>=1,T11<=3,J11="C"),MIN(L11:M11)-30) and various other adaptations but no joy and it just returns a blank cell.
Can anyone see what th
Jun 16 2020 11:57 PM
Solution
How about this?
=IF(AND(T6>=1,T6<=3,J6="C"),MIN(K6:M6)-30,IF(AND(T6>=1,T6<=3,J6<>"C"),MIN(L6:M6)-30,""))
You may also consider using EDATE function like EDATE(MIN(K6:M6),-1) to replace MIN(K6:M6)-30.
Jun 17 2020 12:52 AM
Many thanks@Subodh_Tiwari_sktneer worked like a charm, from the variations I tried, I appeared to be missing the "" from the closest ones.
Thank you for the prompt about EDATE, I was thinking this too :)
Jun 17 2020 12:54 AM
@Triki578 As a variant.
=IF(AND(T11>=1,T11<=3),IF(J11="C",EDATE(MIN(K11:M11),-1),EDATE(MIN(L11:M11),-1)),"")
Jun 17 2020 01:59 AM
Hi@Riny_van_Eekelen , many thanks for your response, much appreciated
Jun 17 2020 02:53 AM
You're welcome @Triki578!
Jun 16 2020 11:57 PM
Solution
How about this?
=IF(AND(T6>=1,T6<=3,J6="C"),MIN(K6:M6)-30,IF(AND(T6>=1,T6<=3,J6<>"C"),MIN(L6:M6)-30,""))
You may also consider using EDATE function like EDATE(MIN(K6:M6),-1) to replace MIN(K6:M6)-30.