LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Range Formula Problem

I have a range BFP (A11:A33) that has 3 columns of formulas (C, D, E) that
use SumProduct that refers to cells on the current sheet and cells on another
sheet. This is the formula in Column C: (SUMPRODUCT(O78:Z78,'2006
Actual'!C10:N10)/1000). Column D & E use same formula, but refer to other
sheets. When I insert a row, I need to update the formulas starting with the
inserted row down to the last row to update the formulas for the other
sheets. But since the last row address in the BFP Range changes, I cannot
figure out how to get the row address to copy the formula down to. I'm
probably making this too hard, but here is the macro I started, before I came
up with the range name.

Sheets("Growth Rates").Activate
Rows(RowNum).Select
Selection.Insert Shift:=xlDown
Range("A" & RowNumM1 & ":" & "H" & RowNumM1).Select
Selection.Copy
Range("A" & RowNum).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("C" & RowNumM1 & ":" & "E" & RowNumM1).Select
Selection.AutoFill Destination:=Range("C" & RowNumM1 & ":" & "E"
& RowNum), Type:=xlFillDefault
Range("C" & RowNumM1 & ":" & "E" & RowNum).Select

I used an input box to get the RowNum where the user wants to insert the new
row.
RowNumM1 is the RowNum - 1
I'm trying to get the RowNum of the last row in the range (I know I need
another variable name) for the Selection.AutoFill Destination or maybe there
is a more simple way. Any help would be appreciated.

 
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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
Problem copying formula to range of cells Bob DePass Setting up and Configuration of Excel 0 July 22nd 05 02:09 AM
cell vs range problem with formula Martin Skrenek Excel Programming 6 April 14th 05 04:28 PM
Reference range in formula problem crapit Excel Programming 4 July 3rd 04 07:26 PM


All times are GMT +1. The time now is 05:40 PM.

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

About Us

"It's about Microsoft Excel"