Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Truncating values of each sale in the range
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SUMPRODUCT or SUMIF if any values in a range equal any values in another range | Excel Worksheet Functions | |||
Point of Sale | Excel Worksheet Functions | |||
sale or lease? | New Users to Excel | |||
If function with date; if sale is Oct place sale $ amount here | Excel Worksheet Functions | |||
skus in columm a for each sale, qty. of skus sold, each sale in co | Excel Worksheet Functions |