View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wigi Wigi is offline
external usenet poster
 
Posts: 396
Default Truncating values of each sale in the range

'...
MyStr = Left(Cell.Value, 2)
Cell.Value = MyStr
'...


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"fbagirov" wrote:

Each cell in a column has a 4 digit number. I need to select the whole column
up to the last raw with values and delete the last 2 digits in each cell's
number.

The code I've got for this is he

Dim MyStr as Variant
.....
Range(Cells(1, 1), Cells(LastRow, 1)).Select
For Each Cell In Selection
MyStr = Left(ActiveCell.Value, 2)
ActiveCell.Value = MyStr
Next Cell


It does not work. Can you please help ? Thanks!