Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Misc
How to insert row on Col A field change
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Per Jessen, post: 13372567"] Try this macro: Sub AAA() StartRow = 3 ' Change to suit TargetColumn = "A" ' Change to suit LastRow = Range(TargetColumn & StartRow).End(xlDown).Row For r = LastRow To StartRow + 1 Step -1 If Range(TargetColumn & r).Value <> Range(TargetColumn & r - 1) Then Rows(r).Insert Range("C" & r - 1).Copy Range("B" & r) Range("B" & r + 1).Copy Range("C" & r) Range("D" & r) = 0 End If Next Application.CutCopyMode = False End Sub Regards, Per [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Misc
How to insert row on Col A field change
Top