Afternoon all
I have a problem with inserting a formula using VBA, which is part of a bigger project
If I was to do this manually, the spreadsheet would look like the following
A1 B1 C1 D1 E1
=b1+c1+d1+e1 Data1 Data2 Data3 Data4 etc
The issue I have is that the number of columns of data is variable. I cannot use SUM as later on in the code I will insert extra columns. I have no problem writing code to calculate the number of columns that would need to be added (and assign that to a variable), however, I am unable to work out how to write the simple excel formula within VB that only adds up the actual number of columns that have data
Thanks in advance
Simon
I have a problem with inserting a formula using VBA, which is part of a bigger project
If I was to do this manually, the spreadsheet would look like the following
A1 B1 C1 D1 E1
=b1+c1+d1+e1 Data1 Data2 Data3 Data4 etc
The issue I have is that the number of columns of data is variable. I cannot use SUM as later on in the code I will insert extra columns. I have no problem writing code to calculate the number of columns that would need to be added (and assign that to a variable), however, I am unable to work out how to write the simple excel formula within VB that only adds up the actual number of columns that have data
Thanks in advance
Simon