OFFSET and ADDRESS trouble

Yamezz

Active Member
Joined
Nov 22, 2006
Messages
364
Office Version
  1. 2019
I have a table starting in A6. I have date and times in column A and numerical values in column B.
I want the date and time of the maximum value in column B. To do this I have
=INDIRECT(ADDRESS(MATCH(MAX($B$6:$B$36000),$B$6:$B$36000,0),1))
This gives me a date/time that is 5 rows out from the actual maximum. I presume this is because ADDRESS is returning a row number within the table, rather than the actual row number in Excel.

Q1: Why is it doing this?
Q2: How can I return the correct row number? I've tried to use OFFSET in there, but I can't get it to work.

Any help?
Thanks.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try rather... Control+shift+enter, not just enter:

=IFERROR(SMALL(IF($B$6:$B$36000=MAX($B$6:$B$36000),ROW($B$6:$B$36000)-ROW($B$6)+1),ROWS($1:1)),"")

This gives you one or more relative row numbers at which a MAX instance occurs.

Control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($A$6:$A$36000,SMALL(IF($B$6:$B$36000=MAX($B$6:$B$36000),ROW($B$6:$B$36000)-ROW($B$6)+1),ROWS($1:1)),"")

in order to get the corresponding date/time values.
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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