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
IAS Server not responding
login script copy a shortcut to everybody's desktop
modify public folders permissions on SBS 2008
Operator '=' is not defined for type 'DBNull' and type 'Integer' - how to fix
anchor on seperate page not working in safari and firefox
Mail stuck in Lotus oubox
Any way of showing a list of the users that logged on to a Windows XP SP3
Exporting mailboxes to PST in Exchange 2007 running on SBS 2008
SCCM Operating System Deployment with SCCM and Multiple Model's of HP Notebooks
How to retrieve and Entities Form or View Metadata