blank rows macro question

  • Thread starter Thread starter DKY
  • Start date Start date
D

DKY

I get this spreadsheet every week that I have to format and all, so
recorded a macro. Something I have to do manually is go through al
the part numbers in columb B and find similar ones. I sort them b
column B, then I insert a blank row to seperate groups of part numbers
Is there anyway to throw this in my macro? Have it sort by column
then put a space after every seperate set of part numbers
 
DKY

one way:

Sub test()
Dim LastRow As Long
Dim i As Long
LastRow = Range("B65536").End(xlUp).Row
Application.ScreenUpdating = False
For i = LastRow To 2 Step -1
If Range("B" & i).Value <> _
Range("B" & i - 1).Value Then
Range("B" & i).EntireRow.Insert
End If
Next 'i
Application.ScreenUpdating = True
End Sub

Regards

Trevor
 
hi,
it might be possible. IF you can find a way to distinguish
between the numbers. post and example of the numbers.
please keep your reply posts to the orginal post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top