Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Select ranges of data with a macro

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Select ranges of data with a macro

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

"Simon - M&M" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Select ranges of data with a macro

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

"Mike H" wrote:

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

"Simon - M&M" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to select Range to protect and unprotect ranges [email protected] Excel Worksheet Functions 2 May 15th 09 06:04 AM
macro to search for & select ranges to sum Jason Head Excel Programming 1 June 14th 06 02:28 AM
How to write a macro to select print ranges that vary monthly wilson@irco[_2_] Excel Programming 8 February 27th 06 05:03 PM
in charting, how do i select data ranges from multiple sheets, sa. michael Charts and Charting in Excel 1 March 6th 05 03:01 PM
Select other workbook to select data in a macro. T Tromp Excel Programming 2 September 19th 03 01:43 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"