Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Generating Date Ranges in Excel 2003

Hello everyone,

Hope everyone had a great holiday vacation!

Down to business though, I have an Excel 2003 Workbook and I need to
create a date range for example cell E1 will say "Week 1/4/2007 -
1/10/2007" and Cell F1 will have "Week 1/11/2007 - 1/17/2007" and so
on... Is there a way to automate this task using Macros or VBA?

Thanks in advance

Jeremiah

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Generating Date Ranges in Excel 2003

How about a formula:

="Week "&TEXT(DATE(2007,1,7*(COLUMN()-5)+4),"mm/dd/yyyy")&" - "
&TEXT(DATE(2007,1,7*(COLUMN()-5)+10),"mm/dd/yyyy")

You may like:

="Week "&CHAR(10)&TEXT(DATE(2007,1,7*(COLUMN()-5)+4),"mm/dd/yyyy")&CHAR(10)
&TEXT(DATE(2007,1,7*(COLUMN()-5)+10),"mm/dd/yyyy")

And turn on wraptext (format|Cells|alignment tab)

And then drag that formula to the right.



wrote:

Hello everyone,

Hope everyone had a great holiday vacation!

Down to business though, I have an Excel 2003 Workbook and I need to
create a date range for example cell E1 will say "Week 1/4/2007 -
1/10/2007" and Cell F1 will have "Week 1/11/2007 - 1/17/2007" and so
on... Is there a way to automate this task using Macros or VBA?

Thanks in advance

Jeremiah


--

Dave Peterson
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
Excel 2007 Date Format Problem terry Excel Discussion (Misc queries) 0 November 25th 06 06:16 AM
excel date scheduling not msProject 4pinoy Excel Worksheet Functions 0 November 11th 06 08:33 PM
Opening Excel 2003 files in Excel 97 DBrownBear Excel Discussion (Misc queries) 0 October 19th 06 05:39 PM
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
Generating a list from Excel 2003 mauro Excel Discussion (Misc queries) 1 November 23rd 05 03:01 AM


All times are GMT +1. The time now is 05:45 PM.

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"