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
How to configure the email check interval in Lotus Domino 8
Library module to process RAW camera files?
Finding all email sent from a certain domain to our Exchange Server for legal purposes
#550 5.3.4 SMTPSEND.OverAdvertisedSiz
e; message size exceeds fixed maximum size ##
Task Scheduler Windows 2008 Server performs task but stays stuck on running. Will this affect the next time the task runs?
File Size vs String Size
how can i get the location of some body by his mobile number or computer IP?
can ping by ip, and by name, but not browse
How Can I Get Rsync to Include Subdirectories?
Setting up FTP Users on IIS 7.5