help with formula

R

Richard

=IF(DATEDIF(B16,TODAY(),"Y")<5,3,4). This formula works fine but It's still
not quite what I need. B16 is a hire date. If that hire date is July within
the first year then I need it to show a "2" instead of a 3 or 4. This has me
stumped?! In other words: 5years = 4 days, 1-4 years = 3 days, after July in
the first year = 2 days.
 
S

SimonCC

=IF(DATEDIF(B16,TODAY(),"Y")<5,IF(AND(DATEDIF(B16,TODAY(),"Y")<1,MONTH(B16)>7),2,3),4)
Not sure if you want 2 days for in July or after July, since you mentioned
both. You can adjust the >7 part to >6 if I guessed it wrong.

-Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Countdown macro - display settings 2
Help with formula 5
Need some PWA help 0
Help with formula? 1
Expanding Date formula 2
Help with formula? 4
help with formula 0
Tweaking formula? 2

Top