Create new excel work sheet by increment 2 on 3rd character

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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

_ _
^¢¯^
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top