View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joecrabtree joecrabtree is offline
external usenet poster
 
Posts: 111
Default Change Range using value in cell

To all,



At the moment my macro uses the code below, so that the value in D10
changes the range selected. However is it possible to change bot the
starting row number as well as the finish row number?

Thanks

Joseph


myRg = "J2:J" & CStr(Range("D10"))


Set ws = Sheets("FINAL Averages")


Set r = Range(myRg)




i.e if I enter 3 into D9, and 10 into D10 it will give the range
J3:J10?


Thanks for your help,


Regards


Joseph Crabtree