I have a worksheet where there are many rows. I need to get the max column index of the last non empty column within a specified selected rows range.
for example, the sheet contains 200 rows, each row contains 26 columns, but currently only rows 20 to 30 are selected. I need to find the maximum last used column index within these rows.
Please note that there can be empty cells in between non-empty cells in a row. I need to consider the last non empty cell only.
How can I achieve this?