Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I use this macro to make tables (named ranges).
How can I modify the macro so that it will set the range to A1:I1000 ? Thanks In Advance. Sub maketable3() Dim SheetList As Sheets Dim RngToName As Range Dim LastRow As Long Dim LastCol As Long Dim NameToUse As String Dim sh As Worksheet Dim I As Long Set SheetList = ActiveWindow.SelectedSheets For Each sh In SheetList I = I + 1 If Application.Range("SheetNames").Cells(I, 1).Value < "" Then With sh LastRow = .Range("a10").End(xlDown).Row LastCol = .Range("a10").End(xlToRight).Column Set RngToName = .Range("a10", .Cells(LastRow, LastCol)) RngToName.Name = Application.Range("SheetNames").Cells(I, 1).Value End With End If Next sh End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Modification - Bob Philips Are You Out There ? | Excel Worksheet Functions | |||
Macro Modification | Excel Worksheet Functions | |||
last modification | Excel Discussion (Misc queries) | |||
Macro modification | Excel Discussion (Misc queries) | |||
Macro Modification Help | Excel Worksheet Functions |