Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT or SUMIF if any values in a range equal any values in another range PCLIVE Excel Worksheet Functions 3 July 15th 09 07:43 PM
Point of Sale Louis111 Excel Worksheet Functions 4 March 5th 08 09:28 PM
sale or lease? possmm1 New Users to Excel 7 February 9th 07 03:38 PM
If function with date; if sale is Oct place sale $ amount here [email protected] Excel Worksheet Functions 1 January 30th 06 09:07 PM
skus in columm a for each sale, qty. of skus sold, each sale in co confused1 Excel Worksheet Functions 1 June 11th 05 09:44 PM


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"