OFFSET and ADDRESS trouble

Yamezz

Active Member
Joined
Nov 22, 2006
Messages
367
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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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