Thread: Dynamic range
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
prakash prakash is offline
external usenet poster
 
Posts: 22
Default Dynamic range

Hi experts,

Need your help/inputs

1. I have an excel file with a columnA of values, for example say upto 27
rows.
2. Based on these column values, I'm having one more column and computing
values into columnB.
3. I'm using
Selection.AutoFill Destination:=Range("B2:B27"), Type:=xlFillDefault
Range("B2:B27").Select
4. Since this macor needs to be used for other excel files as well, I do not
wish to hardcode the range value 27 in the macro.

How can I dynamically change this value of the range? so that if the values
are less or ore than 27, the macro should work.

Thank you in advance.

With Regards