ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   make 1234 - 012034 (https://www.excelbanter.com/excel-programming/338587-make-1234-012034-a.html)

Daniel M[_2_]

make 1234 - 012034
 
I have a cell with a 4 digit number that i need to convert to 6 digit with
zeros. Is there a way i can do this in a macro?

I have 1234
I need 012034

thanks.



PY & Associates[_4_]

make 1234 - 012034
 
How about
="0"&LEFT(A1,2)&"0"&RIGHT(A1,2)

In macro, substitute A1 with range

"Daniel M" wrote:

I have a cell with a 4 digit number that i need to convert to 6 digit with
zeros. Is there a way i can do this in a macro?

I have 1234
I need 012034

thanks.





All times are GMT +1. The time now is 12:43 PM.

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