Need help writing excel formula please

MrBK

New Member
Joined
Nov 25, 2020
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello, I'm stuck writing a excel formula and need assistance and hopeful someone can help please!

I'm trying to write a formula that I can drag down column "P", that will analyze that row from (B:O) for the cell that has the first "1" in it, from left to right order, and return the header number listed in that column that's under the date in row 2. Thanks for your assistance!

Example 1: Row 3 has the first "1" in column "C" from (B3:O3), so it would return the header "13" in cell C2.
Example 2: Row 4 has the first "1" in column "B" from (B4:O4), so it would return the header "14" in cell B2.
Example 3: Row 5 has the first "1" in column "K" from (B5:O5), so it would return the header "5" in cell K2.
Example 4: Row 9 does not have a "1" in it from (B9:O9), so it would return a "0".
 

Attachments

  • Excel Help Needed.jpg
    Excel Help Needed.jpg
    65.1 KB · Views: 16

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Welcome to the MrExcel board!

I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

See if this helps

20 11 25.xlsm
BCDEFGHIJKLMNOP
1
21413121110987654321
3111113
411114
515
60
71113
First 1
Cell Formulas
RangeFormula
P3:P7P3=INDEX(FILTER(B$2:O$2,B3:O3=1,0),1)
 
Upvote 0
Solution

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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