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:


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

<tbody>
</tbody>

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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
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,215,268
Messages
6,123,966
Members
449,137
Latest member
yeti1016

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