# Help with IF function

1. ## Help with IF function

I need help with an IF function. I have a column of dates that I want evaluated. If the date is less than 6 months ago from today, I want to return a value. If the date is between 7-12 months from today, return another value. If between 1-2 years from today, another value. And lastly, if greater than 2 years, return another value. Can someone please help me?

2. ## Re: Help with IF function

Suppose [A1] has the date you want evaluated. This should work:

=IF((TODAY()-A1)<180,"Less than 6mos",IF(AND((TODAY()-A1)>180,(TODAY()-A1)<365),"Between 6 and 12",IF(AND((TODAY()-A1)>365,(TODAY()-A1)<730),"Between 1 and 2","Greater than 2yrs")))

Note- this won't consider leap year

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1