Select ranges of data with a macro

G

Guest

I have formulas in Q5 TO AB20 with a sum formula running from Q21 TO AB21,
someone inserts a new row at the end of the selection of data so the data
range is Q5 TO AB21, however the sum formula doesn't include the new row. I
wanted a macro to select the data from Q5 TO AB21 and auto fill with the
formulas. Next day someone adds another row and the data range is now Q5 TO
AB22. And so on.
Any ideas?

Cheers

Simon
 
G

Guest

Simon,

Creating additional threads will only cause more confusion. Your question
isn't clear it sounds as if you sum the columns of numbers by having a formula

=sum(Q5:Q20) in cell Q21 and you drag this across to AB21 to sum all the
columns.

Where I get lost is when a row is inserted because the formula should
automatically change. If (say) a row is inserted at row 15 the formula will
change to

=sum(Q5:Q21)

Mike
 
G

Guest

I apologise for creating another thread,
What i have is, IF statements occupying cells Q5 to AB20, some will have
values some will not, someone would the enter a new row or more, being row 21
and yes the sum formulas update, the sum formulas being from Q5:Q20, then
R5:R20 and so on, what i needed was a macro or some other way of getting the
IF statements to auto fill down into the new row Q21:AB21. I was thinking a
macro but i cannot seem to get it to select the new row.

Cheers
and sorry about the multiple posts, i got a bit excited on my oother post
and marked it as answered.

Simon
 

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