Hi all,
In my worksheet the user will type a column letter or letters (such as 'GD')
In another cell I want to calculate teh difference between the column number of the cell letter given by the user and start column (F, whcih will be 6)
I tried this:
but get an error
in cell G23, I have this:
and this works fine, as the range toColumn has the value GD, and the formula returns GD1
but what am I doing wrong? And is there a better way to do this?
The reasoning is that I need to determine how many columns across my macro will have to autofill formulas
thanks for any help
Philip
In my worksheet the user will type a column letter or letters (such as 'GD')
In another cell I want to calculate teh difference between the column number of the cell letter given by the user and start column (F, whcih will be 6)
I tried this:
Code:
=CELL("col",cell("contents",G23))
in cell G23, I have this:
Code:
=CELL("contents",toColumn) & 1
but what am I doing wrong? And is there a better way to do this?
The reasoning is that I need to determine how many columns across my macro will have to autofill formulas
thanks for any help
Philip