View Single Post
  #5   Report Post  
fiero84
 
Posts: n/a
Default

Thank you for replying! I received another solution from a "Bernd Plumhoff"
that was a little bit shorter than your example and it did what I needed.

But, I REALLY appreciate you taking the time to answer. I'm sure yours
would have worked as well. :)

"Gord Dibben" wrote:

Operating on chosen column.

Sub InsertRow_At_Change()
Dim i As Long
Dim colno As Long
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
colno = InputBox("Enter a Column Number")
For i = Cells(Rows.Count, colno).End(xlUp).Row To 2 Step -1
If Cells(i - 1, colno) < Cells(i, colno) Then _
Cells(i, colno).Resize(1, colno).EntireRow.Insert
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub


Gord Dibben Excel MVP

On Wed, 23 Mar 2005 08:35:03 -0800, "fiero84"
wrote:

I do several reports everyday that require me to put a blank row between part
numbers that are different.

So, I'd like a Macro that would compare two cells, if they are equal to each
other, do nothing but keep moving down the list and comparing. If the cells
are different, one part number might be 100200 and the other part number
might be 655422, then put a blank row between those two parts and move on to
compare the rest of the list.

I'm pretty good with Excel and formulas - just new to working with Macros -
but am finding out they are pretty similar... just not sure of the correct
commands...

All I need is to see an example...

Many Thanks!!! :)