Hi,
One of many possible solutions, I'm sure. This needs to be entered as an array formula (confirm with CTRL+SHIFT+ENTER, not just ENTER). In cell EC9 and copy down as required:
=MAX(COLUMN($C9:$DW9))-MAX(IF($C9:$DW9="",COLUMN($C9:$DW9)))
Regards
Bookmarks