macros deleting rows

A

Anthony

I use a macro to provide summary data relating to rows of information, the
summary is presented below the rows of information.

The information rows vary from 10 rows to over 100 from day to day.

The problem i have is how to place the summary row 3 rows beneath the last
row of data given the number of rows varies.

I know I could solve it by placing summary above but presentation asists by
being under. Any help greatly appreciated
 
J

Joel

Post the macro

Here is an example

LastRow = Range("A" & Rows.Count).End(xlup).Row

SummaryRow = LastRow + 3


Now if you need to delete the old summary row before adding new data

LastRow = Range("A1").End(xldown).Row
NewRow = LastRow + 1
Rows(NewRow & ":" & Rows.count).Delete

xlup goes to Rows.Count which is a constant 65536 and move up the wroksheet
until data is found. sldown move down the wroksheet until a blank cell is
found in the next row.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top