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?

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Matthew[/TD]
[TD]1/1/18[/TD]
[TD]37[/TD]
[TD]Mark[/TD]
[TD]1/1/18[/TD]
[TD]45[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Mark[/TD]
[TD]1/1/18[/TD]
[TD]45[/TD]
[TD]Mark[/TD]
[TD]1/5/18[/TD]
[TD]41[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Luke[/TD]
[TD]1/1/18[/TD]
[TD]52[/TD]
[TD]Mark[/TD]
[TD]1/12/18[/TD]
[TD]39[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]John[/TD]
[TD]1/1/18[/TD]
[TD]55[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Paul[/TD]
[TD]1/1/18[/TD]
[TD]58[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]George[/TD]
[TD]1/1/18[/TD]
[TD]42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Rich[/TD]
[TD]1/1/18[/TD]
[TD]48[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Tom[/TD]
[TD]1/1/18[/TD]
[TD]51[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Matthew[/TD]
[TD]1/5/18[/TD]
[TD]39[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Paul[/TD]
[TD]1/5/18[/TD]
[TD]60[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Mark[/TD]
[TD]1/12/18[/TD]
[TD]39[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]John[/TD]
[TD]1/12/18[/TD]
[TD]47[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]Luke[/TD]
[TD]1/12/18[/TD]
[TD]39[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]Mark[/TD]
[TD]1/5/18[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]Tom[/TD]
[TD]1/5/18[/TD]
[TD]51[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,224,749
Messages
6,180,730
Members
452,995
Latest member
isldboy

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