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: 3
Default Inserting a Row With Macro - Help

Hello,
I know that something relative to this has been posted before but I
need to get a little more specific in this newsgroup in hopes that I
can get some help. Please keep in mind that I am not a developer, nor
an expert with Excel.

I have (somewhat unsuccessfully) written an excel macro to Insert a
black row while copying the formula and formatting from the row above
it. The macro is assigned to a button that....when the button is hit
.....there is one row added at the row of the "Active Cell".

Problem: Whenever I insert a row, instead of the macro inserting a
blank row containing only the formula from the row above, it will copy
the data along with the formula...which is not what I'm looking
for....

Here is the snippet of code that goes with my InsertRow macro:
Sub InsertCopiedRow()
ActiveSheet.Unprotect "****"
ActiveCell.EntireRow.Copy
ActiveCell.EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
ActiveSheet.Protect "****"

End Sub

I have scoured newsgroups and MSVP Excel pages....and it seems like
everyone is pointing at doing some sort of changes with the formulas
AND the actual macro.....especially with some sort of OFFSET function.
I am open to making this work, but I cannot figure out how to insert
OFFSET properly into my formulas/macros if necessary....

Please see to get a visual of the worksheet:
http://php.indiana.edu/~cawagner/macro.jpg

Any help would be greatly appreciated......

Roger
 
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 for inserting one row between different data eva cheng Excel Discussion (Misc queries) 2 April 2nd 10 02:51 AM
Macro Inserting a formula Kristi Excel Discussion (Misc queries) 0 May 13th 09 05:29 PM
inserting row macro daroc Excel Discussion (Misc queries) 2 March 7th 06 06:27 PM
Inserting Rows Through a Macro Mike[_56_] Excel Programming 3 October 8th 03 03:52 AM
INSERTING ROWS WITH A MACRO Jay Dean Excel Programming 15 September 16th 03 05:08 PM


All times are GMT +1. The time now is 05:32 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"