Simple Question

  • Thread starter Thread starter Ewing25
  • Start date Start date
E

Ewing25

I have a list in a spreadsheet named just sheet 2. With columns A and B
populated to about the 4000 mark.

Column A is full of account numbers and Column B is a formula i made to
display Y if there is a duplicate and N if there is none.

What i want to do is take all the instinces where the formula says Y and
take the corresponding number in Column A and copy and paste it into Column C
with no spaces seperating them.

Any help would be great. thanks!
 
Just sort it by column B and it will be grouped.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Put a formula in column C like this:

=IF(B1="Y",A1,"")

Or code like this:

Sub PopulateColC()
Dim r, c As Range
Set r = Range("B1:B" & Range("A65536").End(xlUp).Row)
For Each c In r
If c.Value = "Y" Then
c.Offset(0,1).Value = c.Offset(0,-1).Value
End If
Next
Set r = Nothing
End Sub
 

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