Copy row IF cell has two values Excel

June 16, 2011 at 16:47:14
Specs: Macintosh
Writing a macro to copy a row and insert it underneath ONLY IF a cell contains a value that is more than two digits (need to look at example to understand).

1 1,2 1/1/11 Time (Dirty Bit), The Black Eyed Peas, The
2 3 1/1/11 We R Who We R Ke$ha

You see int he second column first row, there is 1,2, so it need to copy that and insert it below. I have a code that is working for cells that have values higher than 10,11, Here it is:

Sub Insert_Rows()
Rw = 1
LastRow = 1000
If Cells(Rw, "B") > (99) Then
Rows(Rw + 1).Select
Selection.Insert Shift:=xlDown
Rw = Rw + 1
NewRow = NewRow + 1
End If
If Rw = LastRow + NewRow Then Exit Sub
Rw = Rw + 1
GoTo NxtChk

I'm not sure what kind of value is give by numbers such as 1,2 any tips?
End Sub

See More: Copy row IF cell has two values Excel

Report •

June 16, 2011 at 20:12:40
Never mind, just made it do a search on that row for a ",". Thanks

Report •
Related Solutions

Ask Question