I'm using the following to find the last column that has the search string "=SUM" in it:
This correctly finds that col num 69 (BS) is the last column where "=SUM" exists as part of a formula.
As a test, in Step mode I deleted row BS, moved the execution line back to this, hit F8 so it will re-evaluate and it still gives me the same answer.
I thought it would return col num 68. Can anyone help me understand why it doesn't?
UPDATE:
My error, 69 is BQ and that is the correct value.
Ignore this question.
Code:
LAST_COLUMN_OF_INTEREST_NUMBER = Sheets(PRUNE_SHEET).Cells.Find("=SUM", Sheets(PRUNE_SHEET).Range("A1"), xlFormulas, xlPart, xlByRows, xlPrevious).Column
This correctly finds that col num 69 (BS) is the last column where "=SUM" exists as part of a formula.
As a test, in Step mode I deleted row BS, moved the execution line back to this, hit F8 so it will re-evaluate and it still gives me the same answer.
I thought it would return col num 68. Can anyone help me understand why it doesn't?
UPDATE:
My error, 69 is BQ and that is the correct value.
Ignore this question.
Last edited: