View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Still need help with formula

I think you want this

=IF(B16="","",IF(YEAR(B16)<YEAR(TODAY()),10,IF(TOD AY()-B16<90,0,(TODAY()-B16
)*0.0274)))

And 10 days a year! What are you running, a slave camp?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Richard" wrote in message
...
1) YES, a zero to your first question.

2) If Today()-B16 is greater than 90, but less than Dec 31 of the same

year
then 0.0274 * B16, (from the date in B16 to Dec 31st only)

3) Yes to your third question

*What this is and why it's such a pain... B16 is a hire date.
*If employed less than 90 days you have "0" Vacation days.
*If employed 90 days then you are prorated ( 0.0274 per day) from your

hire
date B16 till the end of the year)
*After Dec 31 of that year it's no longer prorated and you have "10" days,
starting Jan 1 of the next year.
Thanks for your help, I just can't get it!!!

"Bob Phillips" wrote:

The spec is not clear.

You want

if TODAY is within 90 days of B16, then return 0?

if TODAY is less than 31st Dec of B16 year, then return what exactly?

Then if TODAY is greater than 31st Dec of B16 year, then return 10?


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Richard" wrote in message
...
=IF(TODAY()-B16<90,0,INT((DATE(YEAR(B16),12,31)-B16)*0.0274)+0.5)
Still need to make "10" a part of this equation. Everytime I change

one
thing something else changes. And Allen, please, I am using my brain

but
I'm
just not as smart as you guys in Excel. Thanks in Advance!
If < 90, thats ok!
If 90 < 12,31)-B16)*0.0274)+0.5, thats ok!
What I also need: If 12,31 of that same year then "10"
"B16" is a fixed date that never changes