Hi. I have an Excel 2007 workbook and on one worksheet it includes a formula all the way down Column H as follows:
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!F$2:F$62)),ROW('ReferencedSheet'!F$2:F$62),0))-1}
The worksheet it is on is not 'ReferencedSheet' but BaseSheet. I have tested it and it works beautifully! (It finds the last blank cell in column F and then displays the row number of the last 'filled' cell which is in the row above it).
It is only a stepping stone however. What I really need to do is to substitute the references to Column F with a reference to a variable column which I have already determined in column G, so column G currently contains: N, AA, P, G, BX etc.
I tried to use INDIRECT but of course that only works for a complete cell reference so it isn't happy. Please can someone tell me how I get the equivalent of where the column letters are being picked up from my existing Column G:
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!N$2:N$62)),ROW('ReferencedSheet'!N$2:N$62),0))-1}
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!AA$2:AA$62)),ROW('ReferencedSheet'!AA$2:AA$62),0))-1}
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!P$2:P$62)),ROW('ReferencedSheet'!P$2:P$62),0))-1}...etc?
Many thanks in advance!
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!F$2:F$62)),ROW('ReferencedSheet'!F$2:F$62),0))-1}
The worksheet it is on is not 'ReferencedSheet' but BaseSheet. I have tested it and it works beautifully! (It finds the last blank cell in column F and then displays the row number of the last 'filled' cell which is in the row above it).
It is only a stepping stone however. What I really need to do is to substitute the references to Column F with a reference to a variable column which I have already determined in column G, so column G currently contains: N, AA, P, G, BX etc.
I tried to use INDIRECT but of course that only works for a complete cell reference so it isn't happy. Please can someone tell me how I get the equivalent of where the column letters are being picked up from my existing Column G:
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!N$2:N$62)),ROW('ReferencedSheet'!N$2:N$62),0))-1}
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!AA$2:AA$62)),ROW('ReferencedSheet'!AA$2:AA$62),0))-1}
{=MAX(IF(NOT(ISBLANK('ReferencedSheet'!P$2:P$62)),ROW('ReferencedSheet'!P$2:P$62),0))-1}...etc?
Many thanks in advance!