Choosing Oldest Date From Multiple Occurences of Same Category

gumbygr

New Member
Joined
Jul 30, 2017
Messages
5
Thanks for taking the time to try and help solve this problem
I have been struggling with.

I have two sheets. The first sheet 214 S contains data.

The second sheet 214 Lst is where the output goes.

I was looking for a formula or macro that can do the following in excel 2013 for win7:
I was experimenting with Index and Match but I wasn't getting it right.

In sheet 214 S I would like it to look in Column A within each
category/field such as 99 - Tools for the item with the oldest date.

For example the formula or macro would look at all the entries for
99 - Tools (there are 2 entries in the example) and output the oldest date
out of the 99 - Tools entries (which is cell G2 7/1/2017) to another
sheet called 214 Lst in cell B2.

For 100 - Non Tools it would find the oldest date (which is cell G4 8/6/2017) and output
to cell B3 on sheet 214 Lst, and repeat so on down the list until the end of Column A.

(sheet 214 S)
[TABLE="width: 436"]
<tbody>[TR]
[TD]Label1
[/TD]
[TD]Label2
[/TD]
[TD]Label3
[/TD]
[TD]Label4
[/TD]
[TD]Label5
[/TD]
[TD]Label6
[/TD]
[TD]Date
[/TD]
[/TR]
[TR]
[TD]99 - Tools
[/TD]
[TD]12
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]7/1/2017
[/TD]
[/TR]
[TR]
[TD]99 - Tools
[/TD]
[TD]19
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
[TR]
[TD]100 - Non Tools
[/TD]
[TD]103
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
[TR]
[TD]100 - Non Tools
[/TD]
[TD]108
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/22/2017
[/TD]
[/TR]
[TR]
[TD]105 - Main
[/TD]
[TD]203
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/22/2017
[/TD]
[/TR]
[TR]
[TD]105 - Main
[/TD]
[TD]751
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]7/7/2017
[/TD]
[/TR]
[TR]
[TD]105 - Main
[/TD]
[TD]663
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]6/28/2017
[/TD]
[/TR]
[TR]
[TD]110 - Misc
[/TD]
[TD]29
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/5/2017
[/TD]
[/TR]
[TR]
[TD]110 - Misc
[/TD]
[TD]35
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
[TR]
[TD]110 - Misc
[/TD]
[TD]98
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/28/2017
[/TD]
[/TR]
[TR]
[TD]130 - NT
[/TD]
[TD]7
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
[TR]
[TD]135 - Leisure
[/TD]
[TD]100
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
</tbody>[/TABLE]


(sheet 214 Lst)

[TABLE="width: 270"]
<tbody>[TR]
[TD]Label1
[/TD]
[TD]Oldest Date
[/TD]
[/TR]
[TR]
[TD]99 - Tools
[/TD]
[TD]7/1/2017
[/TD]
[/TR]
[TR]
[TD]100 - Non Tools
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
[TR]
[TD]105 - Main
[/TD]
[TD]6/28/2017
[/TD]
[/TR]
[TR]
[TD]110 - Misc
[/TD]
[TD]8/5/2017
[/TD]
[/TR]
[TR]
[TD]130 - NT
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
[TR]
[TD]135 - Leisure
[/TD]
[TD]8/6/2017
[/TD]
[/TR]
</tbody>[/TABLE]

Thanks again.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
please ignore my last post

can you sort the table by label ascending and date ascending - then it is the date by first occurrence of label
 
Upvote 0
You might be on to something.

I'll check on that suggestion to see if that works out right. My brain was fried trying to figure things out.
 
Upvote 0
A pivot table and some extra sorting with added layers did the trick. I apologize for posting the question because I kept looking for a complex answer for a question that needed a much simpler answer. Thank you everyone for your help.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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