Populate and entire row while removing duplicates.

  • Thread starter Thread starter NightLord
  • Start date Start date
N

NightLord

I'm kicking myself in butt here.
I have two sheets. In Sheet 1, Column B there is a row of names- some of
which are duplicates. Bob will show up as often as he has called in.

In Sheet two, I want Column A to populate itself with every name that shows
up in Sheet 1, Columb B... but only once for each name. Thus, even though Bob
has called in 100 times, I just want his name to show up once on Sheet 2.

I'm having isses because I want the Column in sheet 2 to be dynamic. I tried
a pivot table, with a CountIf function, but for the layout it wants something
in the field next to it. I JUST want the row to do the names. Nothing more.
 
In Sheet two, I want Col A to populate itself with every name that shows
up in Sheet 1, Col B... but only once for each name.

Here's one way to drive it out dynamically in Sheet2

Source names assumed in Sheet1, in B2 down

In Sheet2,
In A2:
=IF(Sheet1!B2="","",IF(COUNTIF(Sheet1!B$2:B2,Sheet1!B2)>1,"",ROW()))
Leave A1 empty

In B2:
=IF(ROWS($1:1)>COUNT(A:A),"",INDEX(Sheet1!B:B,SMALL(A:A,ROWS($1:1))))
Select A2:B2, copy down to cover the max expected extent of source data in
Sheet1's col B, say down to row 500? Hide away or minimize col A. Col B will
return the required results, all neatly packed at the top
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,100 Files:360 Subscribers:56
xdemechanik
---
 
Formula adapted from another post...

Assuming you have names in Sheet 1 Col B upto row 1200, no header row
Enter in C1
=COUNTIF(B1:$B$1200,B1) copy down till C1200

Go to Sheet 2
in B1 paste the following
=IF(ROWS($1:1)<=COUNTIF(Sheet1!C$2:C$1200,1),INDEX(Sheet1!B$2:B$1200,SMALL(IF(Sheet1!C$2:C$1200=1,ROW(Sheet1!B$2:B$1200)-ROW(Sheet1!B$2)+1),ROWS($1:1))),"")
and press CTRL-SHIFT-ENTER and copy down... till you get a blank. You may
copy it further down for future additions of names in Sheet 1.
 

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