Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2012, 11:56 AM
ejtoll ejtoll is offline Adding rows and copying formulas Windows 8 Adding rows and copying formulas Office 2010 32bit
Novice
Adding rows and copying formulas
 
Join Date: Dec 2012
Location: Scottsdale (Phoenix), Ariz.
Posts: 1
ejtoll is on a distinguished road
Default Adding rows and copying formulas


I am trying to create an invoice where there are rows that will be added that include a calculation (Col B * Col C = Subtotal) on each row. I have a macro that will insert a row and copy of the formula to the new row, but the formula retains the Column and Row numbers from the previous row.

If I create a row, and copy the formula, say [=B2*C2] into the new row, it remains B2 and C2. I have tried using a row reference or just a column reference, but it doesn't seem to work.

I know it does in Excel 2010, but I cannot maintain control over the page and formatting -- which is necessary for the way the invoice is used.

I did figure out that if I use the formula =SUM(ABOVE), new rows are included in the total, but I can't figure out a way to copy the formula or automate writing a formula to reflect the new row number.

Any help? This is, of course, an urgent matter.

Thanks
Reply With Quote
  #2  
Old 12-05-2012, 05:09 PM
macropod's Avatar
macropod macropod is offline Adding rows and copying formulas Windows 7 64bit Adding rows and copying formulas Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi ejtoll,

Basically, you have three choices:
1. Recreate the formula field from scratch for each new row;
2. Copy an existing formula and edit its code; or
3. Implement a relative referencing formula that will update itself when copied to a new row.

To see how to do this and a wide range of other calculations in Word, check out my Microsoft Word Field Maths Tutorial: https://www.msofficeforums.com/word/...-tutorial.html
In particular, look at the item titled 'Relative Referencing In Tables'. You might also benefit from the tutorial's discussion of the quirks you might encounter when using SUM(ABOVE) and its relatives.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
tables;formula;automating

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding columns in specific rows only mhays Excel 5 01-17-2012 09:13 AM
Adding rows and copying formulas merging rows and creating sub-rows gib65 Excel 2 12-09-2011 02:09 PM
Adding rows and copying formulas adding rows to word table hklein Word VBA 4 07-18-2011 12:21 AM
Adding rows and copying formulas IF Formulas mizzamzz Excel 1 07-08-2010 02:32 AM
Simple formulas den hobbelder Word 1 02-26-2010 01:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft