I need help with a Google Sheets formula to return the column header of the last >0 value in a row (the yellow highlighted cells below are hard-keyed).


enter image description here

  • So, in your sample, what are expecting to get back? – ale Oct 11 '18 at 18:57

Shanda, given what I see in your snippet, and assuming that your first highlighted cell above is B2 and that the dates are in columns D:J, paste this into B2 and copy down as needed:

=ArrayFormula(IF(COUNTIF(D2:J2,">0")=0,"",INDIRECT(ADDRESS(1,COLUMNS(A2:D2)-1+MATCH(2, 1/(D2:J2>0),1)))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.