Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine range with VBA
I am looking to copy Data from another Workbook (which is
never the same size). what code do I need to determine the last row that data is entered on so I can set up the Range? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine range with VBA
Dim rng as Range
with Workbooks("OtherName.xls").Worksheets("Sheet1") set rng = .Range(.Cells(1,1),.Cells(rows.count,1).End(xlup)) set rng = rng.Resize(,10) ' to get 10 columns End with or set rng = .Range("A1").CurrentRegion or ' less reliable set rng = .UsedRange -- Regards, Tom Ogilvy Bryon wrote in message ... I am looking to copy Data from another Workbook (which is never the same size). what code do I need to determine the last row that data is entered on so I can set up the Range? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
determine a range using a formula | Excel Worksheet Functions | |||
use active cell to determine range | Excel Discussion (Misc queries) | |||
Determine if a value in a range is close to the value of another c | Excel Worksheet Functions | |||
Determine if a value in a range is close to the value of another c | Excel Worksheet Functions | |||
Determine whether a value is in a range of cells | Excel Discussion (Misc queries) |