Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using excel 2003 and I need to select rows using a variable. Here is
what I have now: Dim name As String name = Range("e800") ActiveWorkbook.Sheets("individual stats").Range("a1:a1540").Select Selection.EntireRow.Hidden = True Dim Start As Integer Dim finish As Integer Start = Application.WorksheetFunction.Lookup(name, Range("Q800:Q881"), Range("t800:t881")) finish = Application.WorksheetFunction.Lookup(name, Range("Q800:Q881"), Range("u800:u881")) ActiveWorkbook.Sheets("individual stats").Rows(Start, finish).Select Selection.EntireRow.Hidden = False I verifed that in the case I was testing, start = 81 and finish = 100. With this code I get "Application-defined or object-defined error" with the row selection line highlighted. any help would be appreciated |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
selecting rows using a variable. | Excel Programming | |||
selecting variable rows in a macro that creates a pivot table | Excel Programming | |||
selecting range of cells - variable # of rows | Excel Programming | |||
Selecting Variable Rows | Excel Programming | |||
Selecting rows with variable | Excel Programming |