Fetch highest number

am_gup123

New Member
Joined
Mar 22, 2017
Messages
5
Hi,

I need help in writing an excel formulae to achieve this –

In Sheet1, there are 4 columns Date,A,B,C,D. These columns contain different numbers while the date field contains date, the data is sorted in ascending order of date.
In Sheet2, I have a date range (say date1 & date2).

What I want is to fetch the highest number among columns A,B,C,D in sheet1 in the specified date range (date 1 & date2).

Example-
Sheet1 :
Date------A-B-C-D
1-Jan-17-1-2-3-5
2-Jan-17-6-4-5-7
3-Jan-17-1-2-5-3
4-Jan-17-3-4-3-6
5-Jan-17-6-4-1-7
6-Jan-17-2-7-9-4
7-Jan-17-6-1-2-4
8-Jan-17-3-6-9-3
9-Jan-17-1-3-2-1

Sheet2:
Date1=3-jan17 ; date2=7-jan-17
Highest number between this date range is 9…..so 9 should be displayed.

Thanks.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
If you do not have the maxifs function then this should work
where Sheet1!B1:E9 is your numbers, Sheet1!A1:A9 is the dates and A1 and b1 have your dates in Sheet2
Code:
=MAX(INDEX(Sheet1!B1:E9,MATCH(A1,Sheet1!A1:A9,0),0):INDEX(Sheet1!B1:E9,MATCH(B1,Sheet1!A1:A9,0),0))
 
Upvote 0
Hi

With the table in A:E, the start date in G2 and the end date in G3, try:

=MAX(IF(A2:A10>=G2,IF(A2:A10<=G3,B2:E10)))

This is an array formula, you have to confirm it with CTRL-SHIFT-ENTER and not just ENTER.
 
Upvote 0

Excel 2016
ABCDE
1DateABCD
201-Jan-171235
302-Jan-176457
403-Jan-171253
504-Jan-173436
605-Jan-176417
706-Jan-172794
807-Jan-176124
908-Jan-173693
1009-Jan-171321
11
12
13
14Date 1Date 2Option 1Option 2
1503/01/1707/01/1799
Sheet5
Cell Formulas
RangeFormula
D15=MAX(INDEX((A2:A10>=A15)*(A2:A10<=B15)*B2:E10,0))
C15{=MAX((A2:A10>=A15)*(A2:A10<=B15)*B2:E10)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,799
Messages
6,174,669
Members
452,576
Latest member
AlexG_UK

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