Index the value with LARGE() Query

mart_mrexcel

Active Member
Joined
Aug 23, 2008
Messages
310
Office Version
  1. 365
Platform
  1. Windows
I was trying to get the value of the header (i.e. A1:C1) where it has the latest data (regardless of the number whether high or low. The formula I used perfectly returns the correct output when my data starts from A1.

=IFERROR(INDEX($A$1:$C$1,LARGE(IF($A$2:$C$2>0,COLUMN($A$2:$C$2)),ROWS(A$1:A1))),"")

However, when I push my data away from column A (for example i start my data at column B or C), the formula gets a wrong value or it becomes blank if I push more forward.

ABCExpected Output
1202220232024
209
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You didn't show the expected output but maybe this?
Book1
ABCDE
1202220232024
2092023
Sheet8
Cell Formulas
RangeFormula
E2E2=XLOOKUP(TRUE,A2:C2<>"",$A$1:$C$1,,,-1)
 
Last edited:
Upvote 1

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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