Using a Custom Function - determining the row that called it
Simple function:
Function AddVisible(iTotal)
' code to add cells value if the column is visible.
End Function
in the Total column, I call this function with:
=AddVisible(SUM(AV3:DB3))
I need to know which row 'called' the function, so that I can check for
the visible status of the column, then grab the value.
Also, very open to any other, simpler ways to accomplish this. I have a
function that looks at todays date (NOW) when opening the Worksheet, and
hides all the columns with old data, and columns with data that is more
than 12 months in the future. I now need to show the totals of this
'subset' of the data, but am really struggling learning how to do this
with VBA. Scoured the Help files, and my two Excel 'Bibles' - obviously
need an Excel Programming book...
Assistance in the meantime much appreciated!
Masa
|