Microsoft
Software
Hardware
Network
Question : Change value for a range of cells with VBA
I’m looking for a block of VBA code that will loop through Range(“D3:G3”) and change the values from this:
D3 = 200910
E3= 200911
F3= 200912
G3= 201001
To this:
D3 = Oct-09
E3= Nov-09
F3= Dec-09
G3= Jan-10
Any ideas???
Answer : Change value for a range of cells with VBA
Try this....
Dim cell As Range
For Each cell In Range("D3:G3")
With cell
.Value = DateSerial(Left(cell, 4), Right(cell, 2), 1)
.NumberFormat = "mmm-yy"
End With
Next
Wayne
Random Solutions
Posting to Facebook Fan Page and Twitter
Starting Apache with built in SSL_MOD ( Linux RHEL5)
just not sure why this php script wont print out for me...
How to hide a dummy date value.
Oracle 10.2.0.4 upgrade
Pendrivelinux to install Ubuntu Server 10.x
ASA 5510 - site to site vpn - receiving data but not sending
how to insert with vb.net a date time column in sql server
Air 2.0 Native Process: Why does process.standardOutput.rea
dUTFBytes seem to overflow?
object required error