Lookup maximum value with additional maximum criteria

nabaron

New Member
Joined
Sep 4, 2017
Messages
1
Hello!

I am trying to populate missing values based on historical data. The issue is that not every historical year contains data for every variable. So, what I need is a formula to pull the maximum (non-zero) value for a variable from the most recent year that contains data.

Example historical data can be seen below...

ItemYearAB
X
20143304325
X20142504500
X20152900
X20153300
X201600
X20164000
Y201503200
Y20152304000
Y20162000
Y20161750

<tbody>
</tbody>


Based on the above table, I would want to return the following results for variables A and B for each item X and Y...

ItemAB
X4004500
Y2004000

<tbody>
</tbody>


Appreciate any and all help!!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I am trying to populate missing values based on historical data. The issue is that not every historical year contains data for every variable. So, what I need is a formula to pull the maximum (non-zero) value for a variable from the most recent year that contains data.Year2014
ItemX
Example historical data can be seen below...
Count of A
ItemYearABATotal
X201433043252501
X201425045003301
X20152900Grand Total2
X20153300
X201600
X20164000
Y201503200
Y20152304000
Y20162000
Y20161750
Year2015
ItemX
return the following results for variables A and B for each item X and Y...
Count of A
ItemABATotal
X40045002901
Y20040003301
Grand Total2
BY RUNNING A SERIES OF PIVOT TABLES
you can take the last table with numbers in it
and take the max of those numbersYear2016
ItemX
clunky but I can't see any other way as I run excel 2000
and do not have sumifsCount of A
ATotal
01
4001
Grand Total2

<colgroup><col><col span="6"><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,243
Members
448,555
Latest member
RobertJones1986

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