index match or offset?

bgamach1

New Member
Joined
Apr 8, 2016
Messages
8
I am trying to type in a name in column D, and have the data from column B (for that name), generate in ascending order in column E. Any ideas? Is it an index match formula?

ABCDEF
1Matthew1/1/1837Mark1/1/1845
2Mark1/1/1845Mark1/5/1841
3Luke1/1/1852Mark1/12/1839
4John1/1/1855
5Paul1/1/1858
6George1/1/1842
7Rich1/1/1848
8Tom1/1/1851
9Matthew1/5/1839
10Paul1/5/1860
11Mark1/12/1839
12John1/12/1847
13Luke1/12/1839
14Mark1/5/1841
15Tom1/5/1851
16

<tbody>
</tbody>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
In E1:

=INDEX($B$1:$B$15,MATCH(1,($A$1:$A$15=D1)*($C$1:$C$15=F1),0))

In F1:

=LARGE(IF($A$1:$A$15=D1,$C$1:$C$15),ROWS($A$1:A1))

Both need entering CTRL-SHIFT-ENTER not just ENTER.
 
Upvote 0
I'm assuming that you want to enter a name in D1 and have all of the activity for that person list in ascending order by date.
If that's true, try this approach (using your posted example):
D1: a name....Mark
Code:
D2: =IF((COUNTIF($D$1:$D1,$D$1)+1)<=COUNTIF($A$1:$A$15,$D$1),$D$1,"")
Copy that formula down through D15

Code:
E1: =IF(D1<>"",SMALL(INDEX(($A$1:$A$15=$D$1)*$B$1:$B$15,0),ROWS($1:1)+COUNTIF($A$1:$A$15,"<>"&$D$1)),"")
Code:
F1: =IF(D1<>"",SUMIFS($C$1:$C$15,$A$1:$A$15,$D$1,$B$1:$B$15,E1),"")
Copy those formulas down through Row 15

All formulas are regular...not Array Formulas.

Is that something you can work with?
 
Upvote 0
Yes. The =If formulas worked.

Let's say I want the dates for column E to go from most recent to least recent?

I tried adjusting it to this, but it didn't work.

=IF(D1<>"",LARGE(INDEX(($A$1:$A$15=$D$1)*$B$1:$B$15,0),ROWS($1:1)+COUNTIF($A$1:$A$15,"<>"&$D$1)),"")
 
Upvote 0
When I change the formula in Cell E1 to =IF(D1<>"",LARGE(INDEX(($A$1:$A$15=$D$1)*$B$1:$B$15,0),ROWS($1:1)+COUNTIF($A$1:$A$15,"<>"&$D$1)),""), the rows in E1, E2, and E3 return 1/0/1900. Is there a way to change it to read the dates in column B from most recent to least recent?
 
Upvote 0
See if this is any use for the original question.

Name entered in D1, all the shown formulas copied down.
Assumption is that each name/date combination only occurs once in the table.

Excel Workbook
ABCDEF
1Matthew01-Jan-1837Mark01-Jan-1845
2Mark01-Jan-1845Mark05-Jan-1841
3Luke01-Jan-1852Mark12-Jan-1839
4John01-Jan-1855
5Paul01-Jan-1858
6George01-Jan-1842
7Rich01-Jan-1848
8Tom01-Jan-1851
9Matthew05-Jan-1839
10Paul05-Jan-1860
11Mark12-Jan-1839
12John12-Jan-1847
13Luke12-Jan-1839
14Mark05-Jan-1841
15Tom05-Jan-1851
List (2)




Notes:
1. If you don't have the MAXIFS function (introduced in Excel 2016), or in any case, use the F1 formula suggested by Ron.
2. To have the results listed in the opposite date order, simply change the first argument of the AGGREGATE function in cell E1 from 15 to 14 & copy down. All other formulas remain the same.
@steve the fish
Your formula for column E (dates) will fail if the person noted in column D has the same value in column C for more than one date. For example, change the second last value in the col C sample data to 45 and note your results.
 
Upvote 0

Forum statistics

Threads
1,215,777
Messages
6,126,835
Members
449,343
Latest member
DEWS2031

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