PDA

View Full Version : Date



ShakyOBJ
02-14-2008, 06:31 PM
Hi all,

I need to code something.

I have a value from a cell but the value is a text field containing only the year.
I need to change it, so that its a date format.
I only want it to have quarterly dates.

can someone show me. thanks.

oh, how do you code to select a range of data. Say from cell(3, 10) to cell(10,10).

Thanks ppl.

Bob Phillips
02-15-2008, 03:54 AM
Sub GenerateDates()
Dim i As Long

For i = 3 To 10

Cells(i, 10).Formula = DateSerial(Cells(i, 10).Value, (i + 1) Mod 4 + 1, 1)
Next i
End Sub

mdmackillop
02-15-2008, 11:02 AM
how do you code to select a range of data. Say from cell(3, 10) to cell(10,10).

Range(Cells(3, 10), Cells(10, 10)).Select
'or
Cells(3, 10).Resize(8).Select