Hi guys, I was wondering if one of you kind fellows could lend me a hand?
I have created a function to simplify the calculation of a user specified column, however it looks first at a specified cell to find the specific worksheet to calculate, for example;
=CalcStk(F6,G)
This is telling it to look at F6 first to find out which worksheet to look at (column F contains sheet names), then calculate the total sum of everything in column G.
The code I have works, it returns the correct figure. However, it does not work unless I input the function as;
=CalcStk("F6","G")
While this works, it is useless when it comes to another macro copying and pasting the formulas, as nothing inside the quotations changes as Excel sees it as text.
Here is the code I have;
I know this is gonna be something stupid that i've missed, but i've been kicking myself all day trying to get it right.
Any help is greatly appreciated, many thanks!
Bookmarks