View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
ashish128 ashish128 is offline
external usenet poster
 
Posts: 48
Default macro code to sort a range

Hello All,
I tried searching in the group but found nothing of what I was
looking for.
I have a .xls file with 10 worksheets in it. assume that sheets are
named as a,b,c,d to j. I am trying to make a macro which will sort a
range c2:h30 on sheet "a" then range c2:h15 on sheet "b" then range
c2:h45 on sheet "c" and so on.[ I know exact range for each sheet so
nothing is required to be calculated dynamically and also the sorting
will be based upon the cell h2]. I dont want to use loop because I
would like to skip some sheets some times. If any one can tell me how
to write this macro then I will be highly grateful to him. Teach me for
one sheet and I will apply best of my mind to make it work for others
too.
Thanks for listening (or reading so long).