Index-Match find non-blank. Working in Excel 365, but not Excel 2010.

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
801
Office Version
  1. 365
Platform
  1. Windows
Hi guys, the below formula works when placed in the rightmost column of the table:

Brochure_RegionOptIn_NH_LandMailLast_BookedLast_BookedFamilyFunFamilyFunUKUKSportsSportsEventsEventsEUEUShowtimeShowtimeOptIn_ThirdPartyOptIn_DirectEmailResults
<>0<>0>=0<=1000000>=1<=10000
19503​
FamilyFun
<>0<>0>=0<=1000000>=1<=10000
3315​
Sports
<>0<>0>=0<=1000000>=1<=10000
8785​
Events

Excel Formula:
=INDEX($E$1:$P$1,MATCH(TRUE,$E2:$P2<>"",0))

What this does is finds whatever cell is non-blank in the Match range (E2:P2) and then returns the relevant column header.

When I record the macro, it records as Formula2R1C1

However, this is incompatible with Excel 2010. Is there a version of this I can use that will work in both Excel 2010 and 365? Thank you.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
That should work in 2010, but it will need array entry (ie Ctrl Shift Enter)
 
Upvote 0
Solution
That should work in 2010, but it will need array entry (ie Ctrl Shift Enter)

I've literally just found one that appears to work in both versions:

Excel Formula:
=INDEX($E$1:$P$1,MATCH(TRUE,INDEX($E3:$P3<>"",0,0),0))

But thanks anyway amigo!
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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