How to return multiple values for a single criteria

Mangisqa

New Member
Joined
Apr 28, 2011
Messages
9
Hello ,
I have been doing a lot of searching and haven't been able to find the right anwer to help me:

I have a workbook with two worksheets. Worksheet 1 is a paste in report from our system of record that lists the dates that people have taken classes. I want to be able to have a list on worksheet 2 all the dates an employee attended classes. The common criteria is an employee number. I have tried the help section on office and the formula doesn't seem to meet my needs. I also want to be able to drag the formula across the row if needed not down a column.

Worksheet 1
Employee number. Class date
1 1/30/2011
2 2/24/2011
3 1/24/2011
2 3/2/2011
1 4/1/2011
3 2/15/2011
2 3/1/2011


Worksheet 2
Employee number. Dates attended
1.
2
3


There is more information but these are the columns I a
Worried about for this problem

Thanks in advance!!!!!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
You could use a pivot table - highlight all your data, go to Insert and then click on PivotTable. When this creates in a new sheet drag both fields into the Row Labels section - this shows like this:

pivot.jpg
 
Upvote 0
Thanks! But the pivot table messes up true formatting for the rest of the information I need. Is there a formula so it is all in one line?
 
Upvote 0
Hello ,
I have been doing a lot of searching and haven't been able to find the right anwer to help me:

I have a workbook with two worksheets. Worksheet 1 is a paste in report from our system of record that lists the dates that people have taken classes. I want to be able to have a list on worksheet 2 all the dates an employee attended classes. The common criteria is an employee number. I have tried the help section on office and the formula doesn't seem to meet my needs. I also want to be able to drag the formula across the row if needed not down a column.

Worksheet 1
Employee number. Class date
1 1/30/2011
2 2/24/2011
3 1/24/2011
2 3/2/2011
1 4/1/2011
3 2/15/2011
2 3/1/2011


Worksheet 2
Employee number. Dates attended
1.
2
3


There is more information but these are the columns I a
Worried about for this problem

Thanks in advance!!!!!
Let A1:B8 on Sheet1 house the sample you posted, the headers included.

Sheet2

A2: 1
A3: 2
A4: 3

B2, just enter and copy down:
Code:
=COUNTIF(Sheet1!$A$2:$A$9,A2)

C2, control+shift+enter, not just enter, copy across, and then down:
Code:
=IF(COLUMNS($C2:C2)<=$B2,
    INDEX(Sheet1!$B$2:$B$9,SMALL(IF(Sheet1!$A$2:$A$9=$A2,
      ROW(Sheet1!$B$2:$B$9)-ROW(Sheet1!$B$2)+1),
        COLUMNS($C2:C2))),"")
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

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