Extract a list from an array wit specific condition

aes89

New Member
Joined
Aug 4, 2011
Messages
40
Hello All,

I have a range of car brand names.there are repeated names in the range and it varies daily. How do I extract a listing of the names(without the repeated ones) where the cell in the adjacent range is not empty. Not sure if it can be done with excel formulas only or vba is required. Thanks.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Let's assume that A2:A10 contains the car brand names, and B2:B10 contains the corresponding empty/non-empty cells. Try...

D2, confirmed with CONTROL+SHIFT+ENTER:

=SUM(IF(FREQUENCY(IF(B2:B10<>"",MATCH("~"&A2:A10,A2:A10&"",0)),ROW(A2:A100)-ROW(A2)+1)>0,1))

E2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=IF(ROWS(E$2:E2)<=$D$2,INDEX($A$2:$A$10,SMALL(IF(FREQUENCY(IF($B$2:$B$10<>"",MATCH("~"&A$2:A$10,A$2:A$10&"",0)),ROW($A$2:$A$10)-ROW($A$2)+1)>0,ROW($A$2:$A$10)-ROW($A$2)+1),ROWS(E$2:E2))),"")
 
Upvote 0
Thank you. It works perfectly.

On a side note, it looks pretty massive. Is it possible if you could explain how it works in concept? I would like to understand it part by part if possible. Greatly appreciate it. Thank you in advance.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top