Microsoft and thecodeCage cross post submissions. Posting on one site
will automatically show up on the other site. The email is sent from
the site you orginally put the request. The microsoft site is
presently not working porperly. Emails are not being sent when
responses are posted. I think I responed on both sites to this
request.
the code below starts at the last row since you have blank cells in the
data and you are adding new rows.
Sub UnknownProduct()
LastRow = Range("A" & Rows.Count).End(xlUp).Row
RowCount = LastRow
Do While RowCount 1
Data = Range("A" & RowCount)
If Data = "Price" Then
PreviousData = Range("A" & (RowCount - 1))
If PreviousData = "Code" Then
Rows(RowCount).Insert
RowCount = RowCount - 1
Range("A" & RowCount) = "unknown product"
End If
End If
RowCount = RowCount - 1
Loop
End Sub
--
joel
------------------------------------------------------------------------
joel's Profile:
http://www.thecodecage.com/forumz/member.php?userid=229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=145279