I have a spreadsheet that acts as a drawing register.
The first 5 columns make up the drawing name/number. I place the revision number of the drawing in each subsequent column. Some of these columns appear blank, but have formulas for other functions in the worksheet.
I would like the first column after the drawing name/number (col F in this case) to display the latest revision number.
Essentially this means I need a formula (or VBA code) to search for the last non-empty cell in a row, but ignoring cells that have formulas in them (that appear blank).
Find the last not empty row in a range of cells holding a formula is very similar but refers to the last row in a column (I am looking for the last column in a row). I couldnt adapt it. I think my syntax was incorrect.
To mention a few extra points:
- The revisions are alphanumeric
- The revisions are in pairs (as each drawing has a status code and revision, both of which are alphanumeric) and in the first 2 columns (F and G) I need to show the latest status and revision respectively. The status and revision are placed in adjacent columns on the same row each time. So in reality I need a formula that will return the last 2 non-empty columns and the formula needs to ignore cells that contain formulas that return a blank value.
- I have tried various combinations of Lookup (similar to Ron's response below), index and VBA code as shown in the above link. If possible I would like to keep it as a formula but I am not adverse to using VBA.
- The formula only needs to apply to an individual row, but needs to be copied down as each separate drawing is on a new row.