Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Peter
 
Posts: n/a
Default multiple items in database

I have a database in excel where there are duplicated text items in col A.
In Col B are text items (names). I want to create a "table" that in Col A of
the table will have only one accurance of the items in Database col A, and in
the adjacent column (or columns) will have the items from the Database Col B.
I've tried pivot tables but I couldn't find a way to have text displayed in
the data section. I've tried functions but couldn't find something that
worked with multiple occurances.

Database: Table:
col a col b col a col b (and/or
Col c, d etc)
blue Joe Blue Joe
green Ed Green Ed Bob
green BoB Orange Ralph
orange Ralph Red Ed Mary Sam
red Ed
red Mary
red Sam

  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Use DataAdvanced Filter to copy the unique values from Database column A to
another location.

I'll assume you do that and the new location is Sheet2 A1:An. A1 being the
header.

This requires that there are no empty rows within your Database range of
interest.

In Sheet2 B2 enter this formula with the key combo of CTRL,SHIFT,ENTER:

=INDEX(Sheet1!$B$2:$B$8,SMALL(IF(Sheet1!$A$2:$A$8= $A2,ROW(INDIRECT("1:"&COUNTA(Sheet1!$A:$A)))),COLU MN(A:A)))

Copy across to enough cells that will be needed to return all possible
matches. How many will that be? 5? 15?

Then copy down as far as the list of data extends in column A.

Cells with no matches will return a #NUM! error. The easiest way to "hide"
those error returns is to use conditional formatting.

Select the entire range of formulas.
Goto FormatConditionalFormatting
Formula is: =ISERROR(B2)
Set the font color to be the same as the background color
OK out.

Biff

"Peter" wrote in message
...
I have a database in excel where there are duplicated text items in col A.
In Col B are text items (names). I want to create a "table" that in Col A
of
the table will have only one accurance of the items in Database col A, and
in
the adjacent column (or columns) will have the items from the Database Col
B.
I've tried pivot tables but I couldn't find a way to have text displayed
in
the data section. I've tried functions but couldn't find something that
worked with multiple occurances.

Database: Table:
col a col b col a col b
(and/or
Col c, d etc)
blue Joe Blue Joe
green Ed Green Ed Bob
green BoB Orange Ralph
orange Ralph Red Ed Mary Sam
red Ed
red Mary
red Sam



  #3   Report Post  
Peter
 
Posts: n/a
Default

When I did the CTRL,SHIFT, ENTER I got brackets {} around the formula but the
result was #N/A.

"Biff" wrote:

Hi!

Use DataAdvanced Filter to copy the unique values from Database column A to
another location.

I'll assume you do that and the new location is Sheet2 A1:An. A1 being the
header.

This requires that there are no empty rows within your Database range of
interest.

In Sheet2 B2 enter this formula with the key combo of CTRL,SHIFT,ENTER:

=INDEX(Sheet1!$B$2:$B$8,SMALL(IF(Sheet1!$A$2:$A$8= $A2,ROW(INDIRECT("1:"&COUNTA(Sheet1!$A:$A)))),COLU MN(A:A)))

Copy across to enough cells that will be needed to return all possible
matches. How many will that be? 5? 15?

Then copy down as far as the list of data extends in column A.

Cells with no matches will return a #NUM! error. The easiest way to "hide"
those error returns is to use conditional formatting.

Select the entire range of formulas.
Goto FormatConditionalFormatting
Formula is: =ISERROR(B2)
Set the font color to be the same as the background color
OK out.

Biff

"Peter" wrote in message
...
I have a database in excel where there are duplicated text items in col A.
In Col B are text items (names). I want to create a "table" that in Col A
of
the table will have only one accurance of the items in Database col A, and
in
the adjacent column (or columns) will have the items from the Database Col
B.
I've tried pivot tables but I couldn't find a way to have text displayed
in
the data section. I've tried functions but couldn't find something that
worked with multiple occurances.

Database: Table:
col a col b col a col b
(and/or
Col c, d etc)
blue Joe Blue Joe
green Ed Green Ed Bob
green BoB Orange Ralph
orange Ralph Red Ed Mary Sam
red Ed
red Mary
red Sam




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
Choosing multiple items in a drop down list Shad Excel Discussion (Misc queries) 9 July 7th 08 06:38 PM
how do i delete multiple records from my database AUSTINJ Excel Discussion (Misc queries) 1 May 15th 05 11:08 AM
The Template Wizard retains the original location for my database Packwood Excel Discussion (Misc queries) 0 April 15th 05 05:25 PM
How to find the minimum value in a database with multiple values . billybob1 Excel Discussion (Misc queries) 2 January 26th 05 06:11 PM
Count of items using multiple criteria mbparks Excel Worksheet Functions 7 January 2nd 05 09:57 PM


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

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

About Us

"It's about Microsoft Excel"