Row Summary: First, Last, Contiguous, Non-contiguous

tstout1000

New Member
Joined
Jan 26, 2022
Messages
11
Office Version
  1. 365
Platform
  1. Windows
I have a sheet showing forecasts by month.
1644349250589.png


For any particular row I want to be able to identify:
a) the column number or month of the first value >0; I can do this with MATCH(TRUE,(INDEX(U4:AF4>0,0)),0)
b) the column number or month of the last value >0; can't figure this one out
c) the number of months with a value (that's easy =COUNTIFS(U4:AF4,">0")
d) if there are any months where the values non-contiguous )i.e., goes to 0 after the first non 0 and the last non 0 number. Can't figure this one out.

Any ideas on b) and d)
Thanks,
Tim
 

Attachments

  • 1644348866173.png
    1644348866173.png
    11.1 KB · Views: 18

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
b)
=IFERROR(LOOKUP(2,1/ISNUMBER(U4:AF4),COLUMN(U4:AF4)-COLUMN(U4)+1),0)

Didn't understand d)
Please, clarify
Try to provide some examples along with expected results

M.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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