Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy a row of data and only paste the formulas into the next row

Status
Not open for further replies.

BetterBeef

Technical User
Aug 12, 2009
24
US
Is there an easy way to copy data from a row and when you paste it, to only have the formulas paste, and not the raw data? For example, cell A1 had the number 5 in it, and cell A2 had the formula =A1+7, I would like to copy the the row into row 2, but when I paste it, the data in B1 would be blank, and B2 would read =B1+7? Is it possible to write code in VBA to do this, or is there a shortcut out there that I am unaware of?
 
I have tried it. What I don't like about it is what it does to the headings. I don't like the drop down boxes, which is why I wanted to hard code it as shown above.
 
What i do in these circumstances is have a spare row containg just the formulae. (Usually a named range above my data table.)
Copy this, pastespecial, skip blanks will not overwrite existing data in the data cells.

Actually this is a good way of 'auditing" to make sure there are correct formulae everywhere there should be after others have inserted rows etc.



Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top