#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Date Formula

I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a date
5-5-08 and use that same day every 5 lines then create the next weekday add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1) ) - Where cell K2 is the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself every
5 records having a formula do it for me.

Please Help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Date Formula

Not sure what you're wanting but...

A1 = 5/5/2008 (m/d/y)

Enter this formula in A2:

=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1-1)+CEILING(ROWS(A$1:A2)/5,1))

When copied down, the formula will repeat each date 5 times then increment
by 1 day:

A1 = 5/5/2008
A2 = 5/5/2008
A3 = 5/5/2008
A4 = 5/5/2008
A5 = 5/5/2008
A6 = 5/6/2008
A7 = 5/6/2008
A8 = 5/6/2008
A9 = 5/6/2008
A10 = 5/6/2008
A11 = 5/7/2008
etc


--
Biff
Microsoft Excel MVP


"Brooke" wrote in message
...
I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a date
5-5-08 and use that same day every 5 lines then create the next weekday
add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1) ) - Where cell K2 is
the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself
every
5 records having a formula do it for me.

Please Help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Date Formula

Try this:

K2: 5/5/2008
K3: =IF(COUNTIF(K$2:K2,K2)<5,K2,WORKDAY(K2,1))


"Brooke" wrote:

I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a date
5-5-08 and use that same day every 5 lines then create the next weekday add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1) ) - Where cell K2 is the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself every
5 records having a formula do it for me.

Please Help.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Date Formula

Your formula is including Sat, and Sun. OP doesn't want to include Sat, and
Sun based on his/her formula


"T. Valko" wrote:

Not sure what you're wanting but...

A1 = 5/5/2008 (m/d/y)

Enter this formula in A2:

=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1-1)+CEILING(ROWS(A$1:A2)/5,1))

When copied down, the formula will repeat each date 5 times then increment
by 1 day:

A1 = 5/5/2008
A2 = 5/5/2008
A3 = 5/5/2008
A4 = 5/5/2008
A5 = 5/5/2008
A6 = 5/6/2008
A7 = 5/6/2008
A8 = 5/6/2008
A9 = 5/6/2008
A10 = 5/6/2008
A11 = 5/7/2008
etc


--
Biff
Microsoft Excel MVP


"Brooke" wrote in message
...
I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a date
5-5-08 and use that same day every 5 lines then create the next weekday
add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1) ) - Where cell K2 is
the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself
every
5 records having a formula do it for me.

Please Help.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Date Formula

Copy down as far as needed

"Teethless mama" wrote:

Try this:

K2: 5/5/2008
K3: =IF(COUNTIF(K$2:K2,K2)<5,K2,WORKDAY(K2,1))


"Brooke" wrote:

I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a date
5-5-08 and use that same day every 5 lines then create the next weekday add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1) ) - Where cell K2 is the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself every
5 records having a formula do it for me.

Please Help.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Date Formula

On Tue, 26 Feb 2008 12:58:01 -0800, Brooke
wrote:

I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a date
5-5-08 and use that same day every 5 lines then create the next weekday add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1 )) - Where cell K2 is the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself every
5 records having a formula do it for me.

Please Help.


You can try this formula:

With your starting date in A1:

A2: =WORKDAY($A$1,INT(ROWS($5:5)/5))

Fill down as far as required.

Change $A$1 to refer to the cell reference of your starting date.
==========================================
If the WORKDAY function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.

How?

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.
================================
--ron
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Date Formula

Not sure what you're wanting but...

--
Biff
Microsoft Excel MVP


"Teethless mama" wrote in message
...
Your formula is including Sat, and Sun. OP doesn't want to include Sat,
and
Sun based on his/her formula


"T. Valko" wrote:

Not sure what you're wanting but...

A1 = 5/5/2008 (m/d/y)

Enter this formula in A2:

=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1-1)+CEILING(ROWS(A$1:A2)/5,1))

When copied down, the formula will repeat each date 5 times then
increment
by 1 day:

A1 = 5/5/2008
A2 = 5/5/2008
A3 = 5/5/2008
A4 = 5/5/2008
A5 = 5/5/2008
A6 = 5/6/2008
A7 = 5/6/2008
A8 = 5/6/2008
A9 = 5/6/2008
A10 = 5/6/2008
A11 = 5/7/2008
etc


--
Biff
Microsoft Excel MVP


"Brooke" wrote in message
...
I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a
date
5-5-08 and use that same day every 5 lines then create the next weekday
add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1) ) - Where cell K2 is
the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself
every
5 records having a formula do it for me.

Please Help.






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Date Formula

Improvement:

A1 = 5/5/2008 (m/d/y)
Enter this formula in A2:
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1-1)+CEILING(ROWS(A$1:A2)/5,1))


The formula can be reduced to:

=A$1-1+CEILING(ROWS(A$1:A2)/5,1)


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Not sure what you're wanting but...

A1 = 5/5/2008 (m/d/y)

Enter this formula in A2:

=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1-1)+CEILING(ROWS(A$1:A2)/5,1))

When copied down, the formula will repeat each date 5 times then increment
by 1 day:

A1 = 5/5/2008
A2 = 5/5/2008
A3 = 5/5/2008
A4 = 5/5/2008
A5 = 5/5/2008
A6 = 5/6/2008
A7 = 5/6/2008
A8 = 5/6/2008
A9 = 5/6/2008
A10 = 5/6/2008
A11 = 5/7/2008
etc


--
Biff
Microsoft Excel MVP


"Brooke" wrote in message
...
I have the following formula I created and was wondering instead of it
completing each consecutive weekday is there a way to have it take a date
5-5-08 and use that same day every 5 lines then create the next weekday
add
that to 5 lines and continue down 1700 records???

=IF(WEEKDAY(K2)=7,K2+2,IF(WEEKDAY(K2)=6,K2+3,K2+1) ) - Where cell K2 is
the
start date.

I have a 1700 record spreadsheet that instead of keying a date myself
every
5 records having a formula do it for me.

Please Help.





  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Date Formula

On Tue, 26 Feb 2008 23:24:50 -0500, "T. Valko" wrote:

Improvement:

A1 = 5/5/2008 (m/d/y)
Enter this formula in A2:
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1-1)+CEILING(ROWS(A$1:A2)/5,1))


The formula can be reduced to:

=A$1-1+CEILING(ROWS(A$1:A2)/5,1)


The OP requested to return only Weekdays (as did the OP's formula). Your
suggestions also return Saturdays and Sundays.
--ron
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Date Formula

In my original reply I noted:

Not sure what you're wanting but...



--
Biff
Microsoft Excel MVP


"Ron Rosenfeld" wrote in message
...
On Tue, 26 Feb 2008 23:24:50 -0500, "T. Valko"
wrote:

Improvement:

A1 = 5/5/2008 (m/d/y)
Enter this formula in A2:
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1-1)+CEILING(ROWS(A$1:A2)/5,1))


The formula can be reduced to:

=A$1-1+CEILING(ROWS(A$1:A2)/5,1)


The OP requested to return only Weekdays (as did the OP's formula). Your
suggestions also return Saturdays and Sundays.
--ron





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Date Formula

On Wed, 27 Feb 2008 12:45:23 -0500, "T. Valko" wrote:

In my original reply I noted:

Not sure what you're wanting but...



--
Biff
Microsoft Excel MVP


Well, since he specifically requested WEEKdays, and since the formula he was
using excluded Saturdays and Sundays, I guess I didn't have the same
uncertainty on this point as you.
--ron
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
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
Excel Formula to calulate number of days passed from date to date K. Mack Excel Discussion (Misc queries) 8 January 4th 07 11:27 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
formula to calculate future date from date in cell plus days Chicesq Excel Worksheet Functions 8 November 3rd 05 12:25 PM


All times are GMT +1. The time now is 11:18 AM.

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

About Us

"It's about Microsoft Excel"