Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

VBA macro- Range Function

  1. Apr 12, 2008 #1
    Hi,

    How do we select the complete range in the excel file. For example, I hv files with differnt rows and cols and i wanted to write a code to copy the data frm these datasheets to another..so cant use the lines like Range(A1:AJ50).Select..I require somthing generic to change the range depending upon the data in the sheet..please let me know if you know of any such command.

    Also, need a smilar thing for pivot table..need to change sourcedata range R1C1 in the following command dynamically to cover the complete excel sheet..ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _"Sheet1!R1C1:R12C15"

    Thanks
    Candra
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted



Similar Discussions: VBA macro- Range Function
  1. VBA macro programming (Replies: 2)

  2. Excel macro's and VBA (Replies: 18)

Loading...