function to find last used cell in a row in excel
You can get the last row in a range with a formula based on the ROW function. In the example shown, the formula in cell F5 is: =MIN(ROW(data))+ROWS(data)-1. where data is a named range for B5:D10. When given a single cell reference, the ROW function returns the row number for that reference.