View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Custom fill series?

If you liked the formula you will really like this. Position the cursor
where you want the dates to start. Execute the macro. You will be asked for
the first date and the number of weeks desired.

Sub datefillcustom()
ac = ActiveCell.Column
ar = ActiveCell.Row - 1
md = InputBox("Enter date like 01/28/06")

If Not IsDate(md) Then
MsgBox "Start Over"
Exit Sub
End If

mdate = DateSerial(Year(md), Month(md), Day(md))
For i = 1 To InputBox("Enter number of weeks desired")
Select Case Day(mdate)
Case 1: x = "st"
Case 2: x = "nd"
Case 3: x = "rd"
Case Is 3: x = "th"
Case Else
End Select
Cells(ar + i, ac).Value = Day(mdate) & x & Format(mdate, " mmm, yyyy")
mdate = mdate + 7
Next i

--
Don Guillett
SalesAid Software

"martinkorner" wrote in message
...
I need to have a collumn in my spreadsheet which will display every
Sunday's
date.

e.g.
25TH JUNE 2006
1ST JULY 2006
8TH JULY 2006
etc...

I also need the "TH" "ST" ND" and "RD" 's to be in superscript.

I am using Excel 2002 (XP) on a Windows XP Home Edition PC.

Thanks,
Martin