ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro (https://www.excelbanter.com/excel-programming/340044-macro.html)

Zhanna

Macro
 
My macro convert sell with value '0001' to '1'. Need help!!!

Gary''s Student

Macro
 
Let us asume that cell A1 contains 0001 as a text string. The following
macro will convert to the number 1:

Sub changeIt()
Cells(1, 1).Value = Cells(1, 1).Value * 1
End Sub

If, however, the 0001 is actually a number, then just change the format to
remove the leading zeros.
--
Gary''s Student


"Zhanna" wrote:

My macro convert sell with value '0001' to '1'. Need help!!!



All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com