Average Dates based off of shared values in another column

RCarillo

New Member
Joined
Mar 27, 2018
Messages
2
Hi all,

I'm new to the forum and Excel and couldn't find this specific thing on search (or how to word my search), so here goes:

I'm trying to figure out how to compute the average date inspection date of a building based off of the inspection date of each asset in a building for example:


[TABLE="width: 500"]
<tbody>[TR]
[TD]Bldg Number
[/TD]
[TD]Mat/Equip
[/TD]
[TD]Inspection Date
[/TD]
[TD]Average Inspection Date per Building
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]B202001 WINDOWS<strike></strike>
[/TD]
[TD]1/2/2018<strike></strike>
[/TD]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]B203001 SOLID DOORS<strike></strike>
[/TD]
[TD]<strike></strike>1/2/2018<strike></strike>
[/TD]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]B203004 OVERHEAD AND ROLL-UP DOORS<strike></strike>
[/TD]
[TD]<strike></strike>1/5/2017
[/TD]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]106
[/TD]
[TD]D502002 LIGHTING EQUIPMENT<strike></strike>
[/TD]
[TD]<strike></strike><strike></strike>8/17/2016<strike></strike>
[/TD]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]106
[/TD]
[TD]D503001 TELECOMMUNICATIONS SYSTEMS<strike></strike>
[/TD]
[TD]10/21/2011<strike></strike>
[/TD]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]etc.
[/TD]
[TD]etc.[/TD]
[TD]<strike></strike>etc.[/TD]
[TD][/TD]
[TD]<strike></strike>
[/TD]
[/TR]
</tbody>[/TABLE]

My ultimate goal is to sort the buildings in ascending order by the last column.
The original spreadsheet has over 14,000 lines, so I'm look for a way to automate the calculations, if possible.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Put the following formula into D2, but press Ctrl+Shift+Enter when entering the formula.
curly brackets {} should pop up at the edges of the formula bar when entered correctly. You cannot add them manually!!!

=TEXT(AVERAGE(IFERROR(INDEX($A$2:$C$25000,SUBSTITUTE(N(IF(1,IF($A$2:$A$25000=$A2,ROW($A$2:$A$25000)-1,0))),0,""),3),"")),"m/d/yyyy")

Drag that down your data until the end. (or double click the fill handle to send it down).

Does that help?
 
Upvote 0
Yes, Dave, that exactly what I need. It took me a minute to figure out exactly how to get it work with my actual spreadsheet, but it turned out fine. Thanks for the quick solution!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
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