So I have two columns, A and B, and column B has the numbers 3 and 4. I need a macro where everytime the number 3 appears, a blank row is created above it.
Help?
So I have two columns, A and B, and column B has the numbers 3 and 4. I need a macro where everytime the number 3 appears, a blank row is created above it.
Help?
try this:
Sub foo() Dim lr As Long lr = Range("B" & Rows.Count).End(xlUp).Row Dim i As Long For i = lr To 1 Step -1 If Range("B" & i).Value = 3 Then Range("B" & i).EntireRow.Insert End If Next i End Sub
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
You're a rockstar Alan
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks for the rep.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks