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
Copy and Paste using VBA based on criteria including concatenation
Php 500 internal server error received on website but not using xampp at home
SEO // Useful Tool-Assistance?
Can't Remote Desktop to Forefront TMG Server
Custom Control Designer Error
PHP calling URL (which domain got me here?) PATH_INFO?
How do I lookup and insert the foreign key value into a table when passing a variable value from different column in the related table?
Should I make a Drupal Theme from scratch?
PXE-E55: ProxyDHCP service did not reply to request on port 4011 Using SCCM 2007
How can I prevent changes to web browser proxy settings?