ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New Range containing Unique names only (https://www.excelbanter.com/excel-programming/312223-new-range-containing-unique-names-only.html)

steve

New Range containing Unique names only
 
I have four columns of names that are a named range
called "names". I am looking for some code that will
export only the unique names in the "names" range to ONE
column that I wish to name "unique".

Any help would be greatly appreciated.

Steve

John Green[_4_]

New Range containing Unique names only
 
Steve,

You can do this using an array formula. Enter the following formula in the
H2 cell as an array (while in edit mode, hold down Ctrl+Shift and press
Enter).

=INDEX(Names,MIN(IF(COUNTIF($H$1:H1,Names)=0,ROW(N ames)-MIN(ROW(Names))+1)),
MATCH(0,COUNTIF($H$1:H1,INDEX(Names,MIN(IF(COUNTIF ($H$1:H1,
Names)=0,ROW(Names)-MIN(ROW(Names))+1)),,1)),0),1)

Now copy the formula down the page until it starts producing #N/A errors.

John Green
Sydney
Australia

"Steve" wrote in message
...
I have four columns of names that are a named range
called "names". I am looking for some code that will
export only the unique names in the "names" range to ONE
column that I wish to name "unique".

Any help would be greatly appreciated.

Steve




steve

New Range containing Unique names only
 
John, That Solution worked great !
Thanks Steve
-----Original Message-----
Steve,

You can do this using an array formula. Enter the

following formula in the
H2 cell as an array (while in edit mode, hold down

Ctrl+Shift and press
Enter).

=INDEX(Names,MIN(IF(COUNTIF($H$1:H1,Names)=0,ROW( Names)-

MIN(ROW(Names))+1)),
MATCH(0,COUNTIF($H$1:H1,INDEX(Names,MIN(IF(COUNTI F

($H$1:H1,
Names)=0,ROW(Names)-MIN(ROW(Names))+1)),,1)),0),1)

Now copy the formula down the page until it starts

producing #N/A errors.

John Green
Sydney
Australia

"Steve" wrote in

message
...
I have four columns of names that are a named range
called "names". I am looking for some code that will
export only the unique names in the "names" range to

ONE
column that I wish to name "unique".

Any help would be greatly appreciated.

Steve



.



All times are GMT +1. The time now is 06:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com