Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Typo?
Yes Set rng = Range("A1").Current.Region should be Set rng = Range("A1").CurrentRegion as pointed out by Anders. -- Regards, Tom Ogilvy Tom Ogilvy wrote: *If there are no empty rows or columns within the data Dim rng as Range set rng = Range("A1").Current.Region If you have a particular column you want to look at (for example, the 3rd column, column C) lastrow = Cells(rows.count,3).End(xlup).row and if row1 can be used to determine the number of columns lastColumn = cells(1,columns.count).end(xltoLeft).Column set rng = Range(Range("A1"),Cells(LastRow, LastColumn)) -- Regards, Tom Ogilvy * --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variable in if statement | Excel Worksheet Functions | |||
Variable in Range statement | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming | |||
Case statement in variable range | Excel Programming | |||
Passing a variable to a range statement | Excel Programming |