macro to adjust for varying rows of data

Plamanrich

New Member
Joined
Apr 22, 2002
Messages
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.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,058
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top