Search Column then Paste Data at end of Row?
Thanks for all the help guys. I tried Brian's suggestion before I left
work, but I was getting an error. I'll try again on Monday and let you
know how it works.
BTW, I saw the tip at ozgrid, but had no idea how to use that and add
the data at the end of the row.
Also, dmthornton gave me this solution:
Quote:
I'm glad I saw your posting. I never thought of using the
advancedfilter
function for something like this, but I think it could save time. I
played
arround with it and came up with this. I think if you tweek it, it
should
work.
Selection.AutoFilter Field:=2, Criteria1:="FindThisString"
Dim lngCount As Long
lngCount = Range("B2",
Range("B65536").End(xlUp)).SpecialCells(xlCellType Visible).Count
'lngCount
will give you the totoal number of rows
'Do for only the visible cells
For Each c In Range("B2",
Range("B65536").End(xlUp)).SpecialCells(xlCellType Visible)
c.Offset(0, 15) = "new value"
c.Offset(0, 16) = "new value"
Next
|