Custom date format

G

grovesy

Does anyone know how to create a custom date format?

I want to have the far left column display the date but rather tha
having each row being a new date; i.e.

07/06/2004
08/06/2004
09/06/2004
10/06/2004
etc

I want it to have AM and PM; i.e.

07/06/2004 AM
07/06/2004 PM
08/06/2004 AM
08/06/2004 PM
09/06/2004 AM
09/06/2004 PM
etc

How can i do this?

Cheer
 
G

grovesy

Don't worry i figured it out now. I ended up creating a VB fucntion t
do it. If your interested how i did it see below.


Code
-------------------

Sub FillDate()
' Fucntion example by Chris Jameson-Groves 07/06/2004
'
Dim theDate As Date

Range("A1").Select
theDate = Date
For i = 0 To 30
ActiveCell.FormulaR1C1 = Str(theDate) & " AM" '07-Jun-2004"
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = Str(theDate) & " PM"
ActiveCell.Offset(1, 0).Select
theDate = theDate + 1
Next

End Sub
 
N

Norman Harker

Hi Grovesy!

One way:

A1:
7-Jun-2004 1:00

A2:
=A1+.5
Copy down

Custom format:
dd/mm/yyyy AM/PM
 

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

Top