![]() |
Create new excel work sheet by increment 2 on 3rd character
I need create an worksheet as following by using macro, the cell only 6
numeric number like this 000002 002002 004002 006002 ..... 998002 first and second character is 0,the 3rd character need to increment by 2 for each row, the 5th and 6th character is 0, the sixth character is 2 all the way to the end, the last row will be 998002. did any one how to do this in excel macro? thank you so much |
Create new excel work sheet by increment 2 on 3rd character
type cell A1 '00000
type cell A2 '00200 highlight both cells and cursor to right bottom of this range (turns into +) and drag dwon type in B1 '2 copy 2 in all the way down. all cells in this column will have 2 in C1 type =A1&B1 now cursor to bottom right (+sign) and drag down. perhaps there may be easier ways Lillian wrote in message ... I need create an worksheet as following by using macro, the cell only 6 numeric number like this 000002 002002 004002 006002 .... 998002 first and second character is 0,the 3rd character need to increment by 2 for each row, the 5th and 6th character is 0, the sixth character is 2 all the way to the end, the last row will be 998002. did any one how to do this in excel macro? thank you so much |
Create new excel work sheet by increment 2 on 3rd character
Hi,
Sub TEST() Sheets.Add After:=ActiveSheet With Range("A1:A499") .Formula = "=TEXT(ROW()*2,""'000"")&""002""" .Value = .Value End With End Sub -- Regards, Soo Cheon Jheong _ _ ^вп^ -- |
All times are GMT +1. The time now is 04:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com