Formula to find the header index of the first non blank cell of a range in Excel?

*爱你&永不变心* 提交于 2019-12-01 04:42:53

问题


I have this table, which can be seen as a basic custom gantt chart:

And I would like to fill the A column with start dates, based on the first filled cell of the range on the same row, and the header value of its respective column (row 1). It's easier to show my expected result than write it actually:

Thanks very much for your help!


回答1:


In A2 try this formula copied down

=IF(COUNTA(B2:Z2),INDEX(B$1:Z$1,MATCH(TRUE,INDEX(B2:Z2<>"",0),0)),"")

you may have to format column A with the required date format

assumes data up to column Z, adjust as required



来源:https://stackoverflow.com/questions/11153987/formula-to-find-the-header-index-of-the-first-non-blank-cell-of-a-range-in-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!