how to extract from this column

  • Thread starter Thread starter fl
  • Start date Start date
F

fl

I want to extract everything not equal to "GOOD" from this list and
place the results on another column next to it with no blank rows.
Thanks.

Column A Column B
======= ======
GOOD 456
GOOD 123
GOOD 2599
456 2489
GOOD 549
GOOD
123
GOOD
GOOD
2589
GOOD
GOOD
GOOD
GOOD
2489
549
GOOD
GOOD
GOOD
GOOD
 
Try something like the following:


Dim Src As Range
Dim Dest As Range
Set Dest = Range("B1")
For Each Src In Application.Intersect(Columns(1),
ActiveSheet.UsedRange).Cells
If StrComp(Src.Text, "GOOD") <> 0 Then
Dest.Value = Src.Text
Set Dest = Dest(2, 1)
End If
Next Src


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top