insert a range of date

  • Thread starter Thread starter Lynn
  • Start date Start date
L

Lynn

Hi,
i need to insert a date range into excel in the following format, where
the first date is today's date and the 2nd date is 4 days later.

Example:
28/11/2005 - 02/12/2005

How can I achieve the above format so that the month will also be
updated according to calendar.

thanks
 
Wit the start date in A1, this in A2 or B1:
=A1+4
Copy down (or right) as far as you need.
Excel will take care of the correct month and year
 
Another option: Edit>Fill>Series, choose date, day and step value 4
 
Format>Cells>Number, choose Date and select one of the examples.
If none fits your requirements:
Format>Cells>Number, choose Custom. In the Type box, enter: dd mmm yyyy
 
Did you try my suggestion? If so, what was it that made you ask for a macro
instead?
 
i tried
Worksheets("Sheet1").Rows(3).NumberFormat = "dd mmm yyyy"
Worksheets("Sheet1").Cells(3, 11).Value = "(" & Date & ")"

but i find that the result is mm/dd/yyyy

what could be wrong?
 
Yes. By using "(" you make it a text entry. That will override any
formatting and insert a US style date.

Leave out the test or use

Worksheets("Sheet1").Cells(3, 11).Value = "(" & format(Date,"dd mmm yyyy") &
")"

But you should realise that this last option makes it text so you can't use
it as a date for any further calculation
 
<Leave out the test or use>

Leave out the text....

as you hopefully guessed already
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top