Locating first and last non-zero value cells based on value of cell value in COL A

Darren_workforce

Board Regular
Joined
Oct 13, 2022
Messages
146
Office Version
  1. 365
Platform
  1. Windows
I have the following formulas that pull the first and last non-zero cells and populate the header (time interval) in the respective column on the MON tab.
=INDEX(MON!$B$5:$AQ$5,MATCH(TRUE,INDEX(MON!B6:AQ6<>0,),0)) first non-zero in the row
=INDEX(MON!$B$5:$AQ$5,MATCH(TRUE,INDEX(MON!B6:AQ6<>0,),1)) last non-zero in the row.
1668136068864.png


The thing I'd like help with is my AGENT tab. I have a list of employee down column B. If John Smith's name is in B2, then C2 should display 8:00 (first non-zero his row on the MON tab).

Lastly, if the formula is not terribly long, I'd like to try and concatenate C2 so that it would read "first non-zero cell time interval" &" - " &"last non-zero cell time interval"
1668135991482.png

Any help is greatly appreciated!!
 

Attachments

  • 1668135890258.png
    1668135890258.png
    4.6 KB · Views: 10
  • 1668135989435.png
    1668135989435.png
    2.2 KB · Views: 11

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,224,829
Messages
6,181,222
Members
453,024
Latest member
Wingit77

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