#1   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Group items

Hi:

Is there a function to group items
from (for example) column A to another
part of a workbook or sheet. Im trying
to achieve something like the following.

A C
1 apples apples
2 oranges oranges
3 grapes grapes
4 apples
5 oranges
6 grapes
7 apples
8 oranges
9 grapes

Thanks

TK


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Group items

You can accomplish this by using Excel's filtering tools. First, select a
cell in the list to be filtered and then turn on autofilter
(Data/FilterAutofilter). Next, select Advanced Filter (Data/Filter/Advanced
Filter). In the dialog box, check the Unique Records Only. If you want to
produce a filtered list separate from your original list, click the option
labeled, "Copy to another location".

HTH
Phil Webb



"TK" wrote in message
...
Hi:

Is there a function to group items
from (for example) column A to another
part of a workbook or sheet. I'm trying
to achieve something like the following.

A C
1 apples apples
2 oranges oranges
3 grapes grapes
4 apples
5 oranges
6 grapes
7 apples
8 oranges
9 grapes

Thanks

TK




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Group items

TK

See Debra Dalgleish's site for filtering and extracting unique items from a
list.

http://www.contextures.on.ca/xladvfi....html#FilterUR

Gord Dibben Excel MVP

On Tue, 31 Aug 2004 17:27:02 -0700, "TK" wrote:

Hi:

Is there a function to group items
from (for example) column A to another
part of a workbook or sheet. I’m trying
to achieve something like the following.

A C
1 apples apples
2 oranges oranges
3 grapes grapes
4 apples
5 oranges
6 grapes
7 apples
8 oranges
9 grapes

Thanks

TK


  #4   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Group items

Thanks Phil, Gord

Phil's suggestion on advance filters work but exposed the problem that
my actual list has blanks. On Gord's website suggestion I found an
example that dealt with blanks in the list. How lucky can you get with
one post.

Thanks again:



"Gord Dibben" wrote:

TK

See Debra Dalgleish's site for filtering and extracting unique items from a
list.

http://www.contextures.on.ca/xladvfi....html#FilterUR

Gord Dibben Excel MVP

On Tue, 31 Aug 2004 17:27:02 -0700, "TK" wrote:

Hi:

Is there a function to group items
from (for example) column A to another
part of a workbook or sheet. Im trying
to achieve something like the following.

A C
1 apples apples
2 oranges oranges
3 grapes grapes
4 apples
5 oranges
6 grapes
7 apples
8 oranges
9 grapes

Thanks

TK



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Group items

from Frederic SIGONNEAU (MVP Excel):

(de FS si je ne me trompe)

Sub test() 'appelle ListeValUniques
last = Range("B65000").End(xlUp).Row' data are from A2 to Bxx
ListeValUniques Range("A2:B" & last), Range("C1")
End Sub

Sub ListeValUniques(PlageSrc As Range, CellDest As Range)
'Extrait les valeurs uniques d'une colonne et les renvoie
'dans une autre, à partir de CellDest
Dim Arr1, Elt, Arr2(), Coll As New Collection, I As Integer

'If PlageSrc.Columns.Count 1 Then Exit Sub ' possible sur 2 colonnes
Arr1 = PlageSrc.Value

For Each Elt In Arr1
On Error Resume Next
Coll.Add Elt, CStr(Elt)
If Err.Number = 0 Then
ReDim Preserve Arr2(1 To Coll.Count)
Arr2(Coll.Count) = Elt
End If
On Error GoTo 0
Next
For I = 1 To Coll.Count
Cells(I, 3).Value = Coll.Item(I)
Next
End Sub


--
....Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel


"TK" a écrit dans le message de
...
Hi:

Is there a function to group items
from (for example) column A to another
part of a workbook or sheet. I'm trying
to achieve something like the following.

A C
1 apples apples
2 oranges oranges
3 grapes grapes
4 apples
5 oranges
6 grapes
7 apples
8 oranges
9 grapes

Thanks

TK




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
group items in pivot table Ann Excel Worksheet Functions 1 June 3rd 08 06:25 PM
Running Total per group of items Brightgirl168 Excel Worksheet Functions 3 April 22nd 08 06:37 PM
How do I get Excel to automatically group items? jiba Excel Discussion (Misc queries) 3 January 18th 06 04:10 AM
How to group multiple items in to three groups. ramana Excel Worksheet Functions 4 December 1st 05 06:12 AM
how to group several items in different groups to be placed in a c Colin2u Excel Discussion (Misc queries) 1 July 31st 05 07:10 AM


All times are GMT +1. The time now is 05:45 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"