I am trying to develop a macro to build formulas on a second sheet from data in cells of the first sheet.
There are header rows written into merged cells which I need to read and save their addresses.
By making a range that is wide enough to span the widths of the merged cells, I can find the headers, but for some reason, it returns the second, third, fourth, etc. occurrences before looping back to the top to find the actual first occurrence.
Since I really need these to maintain their order, this is not acceptable.
My search string is "CATEGORY ?00" to find all cells that have CATEGORY 100, CATEGORY 200, ..., CATEGORY 900 which is in the merged cells of columns A-J. They start at $A$1:$J$1, but my routine always returns that address as the last address.
I did one test where I inserted a blank row as the first row in the sheet, but since I am trying to work with a previously created "family" of spreadsheets, I would rather get this working with the sheets as is.
Not to mention understanding why I cannot get this to function as I expect or understand the logic in the code.
Thanks.
There are header rows written into merged cells which I need to read and save their addresses.
By making a range that is wide enough to span the widths of the merged cells, I can find the headers, but for some reason, it returns the second, third, fourth, etc. occurrences before looping back to the top to find the actual first occurrence.
Since I really need these to maintain their order, this is not acceptable.
My search string is "CATEGORY ?00" to find all cells that have CATEGORY 100, CATEGORY 200, ..., CATEGORY 900 which is in the merged cells of columns A-J. They start at $A$1:$J$1, but my routine always returns that address as the last address.
I did one test where I inserted a blank row as the first row in the sheet, but since I am trying to work with a previously created "family" of spreadsheets, I would rather get this working with the sheets as is.
Not to mention understanding why I cannot get this to function as I expect or understand the logic in the code.
Thanks.