![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 03:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com