Finding Row Header or 1st and last cell populated with Data

gahooja

New Member
Joined
Mar 26, 2010
Messages
14
I have a set of data which has dates in D4:AE4 starting from Jan 2011 to April 2013 underneath that i have data set of hours charged to a particular project. I am trying to see if there is a formula that i can use to determine the duration of the project based on what is populated in the rows below.

For Example

Row 4 - jan11, feb11, mar11, apr11, may11, june11
Proj X - 0 , 24, 40, 0, 0, 0
Proj Y - 20, 20, 20, 20, 0, 0
Proj Z - 0, 0, 0, 40, 40, 40


I should be able to get the following results from the data set:
Proj X, Start Date Feb 11 - End Date Mar 11
Proj Y, Start Date Jan 11 - End Date Apr 11
Proj Z, Start Date Apr 11 - End Date Jun 11

It could be 2 different formulas to determine start date which would lookup 1st date with row greater than zero and then End date which would show last cell with data greater than zero.
Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi try this,

Code:
Start Date = INDEX($D$4:$AE$4,MATCH(TRUE,INDEX(D5:AE5>0,0,0),0))
End Date = LOOKUP(TRUE,1/D5:AE5>0,$D$4:$AE$4)
 
Upvote 0
The start date works perfectly but the end date formula stops at the 1st non blank column. There are instances where for 1 month it goes to zero and then picks back up.
 
Upvote 0
but it works for me


Excel 2010
CDEFGHIJK
428/05/201329/05/201330/05/201331/05/201301/06/201302/06/201303/06/201304/06/2013
5a04004444
6b80088880
7c
8
9
10ProjectStartEnd
11a29/05/201304/06/2013
12b28/05/201303/06/2013
Sheet1
Cell Formulas
RangeFormula
D11=INDEX($D$4:$K$4,MATCH(TRUE,INDEX(D5:K5>0,0,0),0))
E11=LOOKUP(TRUE,1/D5:K5>0,$D$4:$K$4)
 
Upvote 0
The start date works perfectly but the end date formula stops at the 1st non blank column. There are instances where for 1 month it goes to zero and then picks back up.
Both formulas work fine for me.
 
Upvote 0
Yes, that would be possible as well.

Start date: Control+shift+enter, not just enter...

=INDEX(B1:G1,MATCH(TRUE,ISNUMBER(1/B2:G2),0))

End date: Just enter...

=LOOKUP(9.99999999999999E+307,1/B2:G2,B1:G1)

You can concatenate the results if so desired.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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