- #1
coolcp
- 1
- 0
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 can't 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
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 can't 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