View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mahnian Mahnian is offline
external usenet poster
 
Posts: 15
Default Macro: Altering cells in a range

Unfortunately, this did not work. I am not sure what it did but nothing
changed on the sheet.

"Gary Keramidas" wrote:

here's one way:

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Dim i As Long

Set ws = Worksheets("Sheet1")
lastrow = ws.Cells(Rows.Count, "G").End(xlUp).Row
Application.ScreenUpdating = False

With ws
For i = 2 To lastrow
.Range("G" & i).Value = Split(Range("A1"))(0)
Next
End With
Application.ScreenUpdating = True
End Sub

--


Gary

"Mahnian" wrote in message
...
I need to alter approximately 10,000 cells on a single sheet.
The range I need to replace is G2 through the end of the column, which
varies depending on call flow.

The cell is imported in one of the following two patterns:
9/27/2008 2:09:18 AM
10/27/2008 12:09:18 AM

I need the output of the cell to only be the date: 9/27/2008 or 10/27/2008

If anyone can shed any light on this for me, I would greatly appreciate
it.

--Ian