Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Need formula for date ranges Please & Thanks

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Need formula for date ranges Please & Thanks

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(paydatethird_Wed_Date,next_month_third_Wed_Da te,paydate)


HTH

"Digital2k" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get a new calculated date from different date ranges? Ann LeBlanc Excel Worksheet Functions 3 June 26th 09 01:56 PM
Formula to sum for different date ranges confused in tn Excel Worksheet Functions 4 December 1st 08 06:27 PM
how copy formula that contains ranges so ranges do not overlap Patty Excel Worksheet Functions 1 November 20th 08 04:15 PM
Number of days in overlapping date ranges (using array formula?) ajnmx Excel Worksheet Functions 7 August 29th 08 11:21 AM
Date ranges in a sum formula Marcus Caterino Excel Worksheet Functions 2 June 26th 06 10:44 PM


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"