Hello all,
I'm trying to use TabName in a formula to complete a function that takes the last populated cell in a given column range within the same sheet, regardless of the sheet name.
I have the TabName VBA simply as:
Function TabName()
TabName = ActiveSheet.Name
End Function
Inside my cell, I've tried:
=LOOKUP(2,1/(TabName(Name!$BA:$BA<>"")),(TabName(Name!$BA:$BA)))
and
=LOOKUP(2,1/(TabName!$BA:$BA<>""),TabName!$BA:$BA)
In a separate sheet where the referenced sheet name isn't dynamic I have =LOOKUP(2,1/(Database!$A:$A<>""),Database!$A:$A) which is working fine.
If there's an alternative to referencing the sheet that the formula is written in I'd be happy to learn some alternatives too!
I'm trying to use TabName in a formula to complete a function that takes the last populated cell in a given column range within the same sheet, regardless of the sheet name.
I have the TabName VBA simply as:
Function TabName()
TabName = ActiveSheet.Name
End Function
Inside my cell, I've tried:
=LOOKUP(2,1/(TabName(Name!$BA:$BA<>"")),(TabName(Name!$BA:$BA)))
and
=LOOKUP(2,1/(TabName!$BA:$BA<>""),TabName!$BA:$BA)
In a separate sheet where the referenced sheet name isn't dynamic I have =LOOKUP(2,1/(Database!$A:$A<>""),Database!$A:$A) which is working fine.
If there's an alternative to referencing the sheet that the formula is written in I'd be happy to learn some alternatives too!