Thanks voodooJoe, you're script works perfectly on the table examples!
Sorry I didn't give you more info.. I thought someone would just point
me in the right direction and give me a kick..I was really excited to
see a working script made up!
However, putting it into action on the actual spreadsheet has created
some issues..you guys seem to know everything tho..
The ranges for the actual tables are B18:D32, B52:D83, B104:D135.
There is a bunch of other stuff in between the tables, merged cells and
whatnot.. Here is the script I am using, it keeps dropping the rows from
the second and third tables..any ideas?
Sub X()
'id your range
Set rng = Range("B18:D32,B52:D83,B104:D135")
'set range values to array & clear the range
'the values are in the array
aydata = rng
rng.ClearContents
'this will track where to put the data
desrow = 1
'loop thru the array
For i = LBound(aydata) To UBound(aydata)
'if the value in the 3rd column is not equal to zero
If aydata(i, 3) < 0 Then
'write the row to the spreadsheet
For j = 1 To 3
rng.Cells(desrow, j) = aydata(i, j)
Next j
'skip to next row UNLESS this is the 4th row in the block, then skip 2
rows
If desrow / 15 = Int(desrow / 15) Then desrow = desrow + 20 Else desrow
= desrow + 1
End If
Next i
End Sub
--
grahamhurlburt
------------------------------------------------------------------------
grahamhurlburt's Profile:
http://www.excelforum.com/member.php...o&userid=29878
View this thread:
http://www.excelforum.com/showthread...hreadid=498835