View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
DEE DEE is offline
external usenet poster
 
Posts: 250
Default automatic Serial number

i have one sheet which has a macro button. based on the inputs from sheet1
when i click on the macro button i get sheet2 populated. In sheet 2 i want
serial numbers to be assigned automatically. how do i write this inside the
macro code. I have code to sort the names and merge them but how do i assign
automatically teh Srl#.
for eg., if my sheet1 has the following entries,
1 name1
2 name1
3 name2
4 name3
5 name3
6 name3

my sheet 2 shud look like this:
1 name1
name1
2 name2
3 name3
name3
name3

whateva sR # i give in sheet1, my sheet2 should populate proper sno.