Forum Discussion
MegGarcia
Sep 09, 2024Copper Contributor
Return different values depending on multiple conditions
Hi
I wonder if there's someone out there who can help.
I've got a set of dates in column C and a set of values 1-12 in column E.
I need column L to return dates as follows:
For L2:
C2+180 if E2 between 1-3
C2+90 if E2 between 4-7
C2+60 if E2 between 8-11
C2+30 if E2 >11
I'm trying to find a formula I can use in column L that will allow all these conditions and return a value accordingly.
I'd be using relative references, so L3 would be based on C3 and E3, etc.
Any ideas?
3 Replies
- SergeiBaklanDiamond Contributor
In L2:
=IF(OR(C2=0, E2=0), "", C2+IFS(E2>11, 30, E2>7, 60, E2>3, 90, E2>0, 180))
Format L2 as a date, then fill down.
- MegGarciaCopper Contributor
Ah, IFS! Works a treat. Thank you!