#1   Report Post  
Remote Desktop Connection hotkey
 
Posts: n/a
Default Group values

I have column B with 20 values in it. Some of the values repeat more than one
time. For example word fox appears 2 times, word wolf appears 4 times e.t.c

Is there any way to group non-unique values? I mean like perform select with
grouping ? For example I have range of values B1:B20 and i want to put
resulting range to C1:C20, but i only want to have unique values in resulting
range.
If excel would support SQL in order to get resulting range i want, i would
write: "SELECT DISTINCT column B FROM workbook1"
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Look at advanced filter which allows you to copy unique values to a new
location.

DataFilterAdvanced Filter.

--
HTH

Bob Phillips

"Remote Desktop Connection hotkey"
ft.com wrote in message
...
I have column B with 20 values in it. Some of the values repeat more than

one
time. For example word fox appears 2 times, word wolf appears 4 times

e.t.c

Is there any way to group non-unique values? I mean like perform select

with
grouping ? For example I have range of values B1:B20 and i want to put
resulting range to C1:C20, but i only want to have unique values in

resulting
range.
If excel would support SQL in order to get resulting range i want, i would
write: "SELECT DISTINCT column B FROM workbook1"



  #3   Report Post  
Remote Desktop Connection hotkey
 
Posts: n/a
Default

Ok. this is solution, but is there any way to make it happen automatically ?
Cuz looks like with this solution I still have to manualy do it for each of
my tabs. (I have 1 tab for each day of the month and there is still 12 of
them in a year !)

Any way to perform the same using formulas would be exelent ...

"Bob Phillips" wrote:

Look at advanced filter which allows you to copy unique values to a new
location.

DataFilterAdvanced Filter.

--
HTH

Bob Phillips

"Remote Desktop Connection hotkey"
ft.com wrote in message
...
I have column B with 20 values in it. Some of the values repeat more than

one
time. For example word fox appears 2 times, word wolf appears 4 times

e.t.c

Is there any way to group non-unique values? I mean like perform select

with
grouping ? For example I have range of values B1:B20 and i want to put
resulting range to C1:C20, but i only want to have unique values in

resulting
range.
If excel would support SQL in order to get resulting range i want, i would
write: "SELECT DISTINCT column B FROM workbook1"




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

If they all work the same, record the steps on one worksheet, then just add
a loop to do for each sheet.

--
HTH

Bob Phillips

"Remote Desktop Connection hotkey"
ft.com wrote in message
...
Ok. this is solution, but is there any way to make it happen automatically

?
Cuz looks like with this solution I still have to manualy do it for each

of
my tabs. (I have 1 tab for each day of the month and there is still 12 of
them in a year !)

Any way to perform the same using formulas would be exelent ...

"Bob Phillips" wrote:

Look at advanced filter which allows you to copy unique values to a new
location.

DataFilterAdvanced Filter.

--
HTH

Bob Phillips

"Remote Desktop Connection hotkey"
ft.com wrote in

message
...
I have column B with 20 values in it. Some of the values repeat more

than
one
time. For example word fox appears 2 times, word wolf appears 4 times

e.t.c

Is there any way to group non-unique values? I mean like perform

select
with
grouping ? For example I have range of values B1:B20 and i want to put
resulting range to C1:C20, but i only want to have unique values in

resulting
range.
If excel would support SQL in order to get resulting range i want, i

would
write: "SELECT DISTINCT column B FROM workbook1"






  #5   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

There may be another roundabout way to achieve this (using an array formula
(Ctrl+Shift+Enter))

Assume your data is in A2:A5
In cell B2, enter the following formula and copy down-
IF(COUNTIF($A$2:$A$5,A2)1,0,MAX($B$1:B1)+1)
In cell C2, entet the following array formula and copy downward

IF(MIN(IF((B2:B50)*(B2:B5MAX($C$1:C1)),B2:B5))0 ,MIN(IF((B2:B50)*(B2:B5MAX($C$1:C1)),B2:B5)),"")

In D2, enter the following formula and copy downward

=INDEX($A$2:$B$5,MATCH(C2,B2:B5,0),1)

Though this formula achieves the result, i believe it can be made more sleek
by giving some more time and thought

Hope this helps

Regards,
"Remote Desktop Connection hotkey" wrote:

I have column B with 20 values in it. Some of the values repeat more than one
time. For example word fox appears 2 times, word wolf appears 4 times e.t.c

Is there any way to group non-unique values? I mean like perform select with
grouping ? For example I have range of values B1:B20 and i want to put
resulting range to C1:C20, but i only want to have unique values in resulting
range.
If excel would support SQL in order to get resulting range i want, i would
write: "SELECT DISTINCT column B FROM workbook1"



  #6   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Try this:

Array entered:

=INDEX(B$1:B$20,SMALL(IF(COUNTIF(B$1:B$20,B$1:B$20 )=1,ROW($1:$20)),ROW(A1)))

Biff

"Ashish Mathur" wrote in message
...
Hi,

There may be another roundabout way to achieve this (using an array
formula
(Ctrl+Shift+Enter))

Assume your data is in A2:A5
In cell B2, enter the following formula and copy down-
IF(COUNTIF($A$2:$A$5,A2)1,0,MAX($B$1:B1)+1)
In cell C2, entet the following array formula and copy downward

IF(MIN(IF((B2:B50)*(B2:B5MAX($C$1:C1)),B2:B5))0 ,MIN(IF((B2:B50)*(B2:B5MAX($C$1:C1)),B2:B5)),"")

In D2, enter the following formula and copy downward

=INDEX($A$2:$B$5,MATCH(C2,B2:B5,0),1)

Though this formula achieves the result, i believe it can be made more
sleek
by giving some more time and thought

Hope this helps

Regards,
"Remote Desktop Connection hotkey" wrote:

I have column B with 20 values in it. Some of the values repeat more than
one
time. For example word fox appears 2 times, word wolf appears 4 times
e.t.c

Is there any way to group non-unique values? I mean like perform select
with
grouping ? For example I have range of values B1:B20 and i want to put
resulting range to C1:C20, but i only want to have unique values in
resulting
range.
If excel would support SQL in order to get resulting range i want, i
would
write: "SELECT DISTINCT column B FROM workbook1"



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Match function with duplicate values in an array Richard Excel Worksheet Functions 3 April 22nd 23 07:45 PM
Calculate cell row and column Barb R. Excel Discussion (Misc queries) 7 May 2nd 05 07:02 PM
Count Distinct Values by Group Using Pivot Table (NM) MCP Excel Worksheet Functions 3 February 11th 05 09:22 PM
Can't group pivot table items by month in Excel scott_ensley Excel Discussion (Misc queries) 1 February 1st 05 08:41 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM


All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"