Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Myrna Larson wrote
I tested the code below with 37 cells filled in the range, the lowest one E19. Thanks for looking at this. To further complicate things, the copied ranges frequently contain blanks, so the range in any given column after looping through the ranges from 6 sheets of the source file may not be full. That's why my current routine adjusts for UsedRange. Sub GetStats() For i = 1 To 6 With Workbooks("attendance stats.xls").Sheets(i) ..Range("B5:F5").Copy Range("A" & ActiveSheet.UsedRange.Rows.Count + 1) ..Range("G5:K5").Copy Range("A" & ActiveSheet.UsedRange.Rows.Count + 1) ..Range("L5:P5").Copy Range("A" & ActiveSheet.UsedRange.Rows.Count + 1) ..Range("Q5:U5").Copy Range("A" & ActiveSheet.UsedRange.Rows.Count + 1) ..Range("V5:Z5").Copy Range("A" & ActiveSheet.UsedRange.Rows.Count + 1) End With Next End Sub -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
range, cell refrence, but with a new twist | Excel Worksheet Functions | |||
Cell protection - with a twist | Excel Discussion (Misc queries) | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
Splitting a cell, with a twist! | Excel Discussion (Misc queries) | |||
Empty cell and a the empty String | Excel Programming |