![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 1
|
have a bunch of spreadsheets that are of varying rows of data. I want to record a mraco that will number the row numbers
and provide some formating in certain cells and column-total certain columns. The data is all in the same location column-wise, only the number of rows differs. When I record the macro, it specifies that bottom of the columns (ie; Range "A32"). The next spreadsheet may have 50 rows but the macro does everything as if there are 32 rows of data. How can I tell the macro to adjust for more rows of information. Thanks in advance. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
You can put it in a for loop saying that something like:
dim StartRow as integer dim EndRow as long dim i as long EndRow=ActiveSheet.UsedRange.Rows.Count For i= StartRow to EndRow 'Insert your code here Next i
__________________
Kind regards, Al Chara |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|