I'm making an excel macro to total the columns, and I can't figure out how to input variables as part of the expression. I currently have two strings, which have the following values stored in them:
string1 = H2
string2 = H21
I need to know the code to sum that range. I'm guessing the code should be something like:
Range("H22").Formula = "=SUM(string1:string2)"
but I'm not sure where the quotes are supposed t go and if I'm supposed to use something instead of .formula, like maybe .value.
Thanks in advance.
string1 = H2
string2 = H21
I need to know the code to sum that range. I'm guessing the code should be something like:
Range("H22").Formula = "=SUM(string1:string2)"
but I'm not sure where the quotes are supposed t go and if I'm supposed to use something instead of .formula, like maybe .value.
Thanks in advance.