# Relative date and domain formula

Hi everyone,

I have to rebuild the relative date and domain formulas with Monday terminology. Not sure where to start. It’s giving me an illegal formula error. I’m using this code:

=IF({Last active}=“”,“”,(IF((AND({Last active}<TODAY(),{Last active}>=EDATE(TODAY(),-3))),“Past 3 Months”,(IF((AND({Last active}<TODAY(),{Last active}>=EDATE(TODAY(),-6))),“Past 6 Months”,(IF((AND({Last active}<TODAY(),{Last active}>=EDATE(TODAY(),-12))),“Past Year”,(IF((AND({Last active}<TODAY(),{Last active}<EDATE(TODAY(),-12))),“Older”,“Never”)))))))))

We have a campaign for polishing Meta Business Suite access to people from our client. We have a table with MBS ID, email address of the person etc., general info. I need to create the relative date one, as I wrote above. I supposed it should be about when the person was last active so we know whether to remove the person or not.

Hi @Dax1,

You don’t need to use any AND clause. For instance: why use AND({Last active}<TODAY(),{Last active}<EDATE(TODAY(),-12)? If the 2nd condition is met, the first is automatically met.

So try something like this:

``````If ({Last active}<EDATE(TODAY(),-12), "Older",
If ({Last active}<EDATE(TODAY(),-6), "Past Year",
If ({Last active}<EDATE(TODAY(),-3), "Past 6 Months",
If ({Last active}<TODAY(), "Past 3 Months",
))))
``````
1 Like