Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / June 2006

Tip: Looking for answers? Try searching our database.

Need formula for date ranges Please & Thanks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Digital2k - 24 Jun 2006 03:09 GMT
I'm in the Insurance business and when I sell a product I have an expected
date that I think it will get approved and get paid. One of the products,
product "M" must get paid before the third Wednesday of the month if not
then it will go the following month.

I want to create a spreadsheet that will automatically make the adjustment
by changing the month paid if the product is product "m" and the expected
date paid is after the third Wednesday of the month.  How can I do this?

Please help

Digital2k
Toppers - 24 Jun 2006 11:20 GMT
Hi,
         This is based on previous formulae posted by Ron Rosenfield:

To find the first day i.e. Monday, Tuesday etc the general formula is (for
date in A1) :

=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+8-DOW)

where DOW is day of week (1=Sun, 2=Mon, etc)

For Wedneday (day=4) the formula becomes:

=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+8-4)

OR

=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+4)

and the third Wednesday becomes

=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+4)+14

OR

=A1-DAY(A1-WEEKDAY(A1-DAY(A1)+4)+22

Using the above, the third Wednesday of the next month is:

=DATE(YEAR(A1),MONTH(A1)+1,1)-DAY(DATE(YEAR(A1),MONTH(A1)+1,1))-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,1)-DAY(DATE(YEAR(A1),MONTH(A1)+1,1))+4)+22

i.e repeat for month+1

Hopefully you can use to apply to your If test - something like .....

=if(paydate>third_Wed_Date,next_month_third_Wed_Date,paydate)

HTH

> I'm in the Insurance business and when I sell a product I have an expected
> date that I think it will get approved and get paid. One of the products,
[quoted text clipped - 8 lines]
>
> Digital2k
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.