Sum Function using VBA Excel What would be the first thing that you will do if you want to check how to code Sum function in VBA? Record a Macro, of course and boom, code in VBA is ready and done. Recording a Sum macro in Excel, will have a code like this one below: ActiveCell.FormulaR1C1 = “=SUM(RC[-9]:RC[-2])” Now the question is how to interpret this formula? What if the range change or the requirements need a different cells location? Record again a new VBA? I don’t think it’s a good idea. The formula that Excel uses when you record isn't that hard to interpret. You just need to get the hang of it. Let's interpret the above excel formula. ActiveCell.FormulaR1C1 = “=SUM(RC[-9]:RC[-2])” If you will just do a basic formula function, you can just type: ...
Make the world a better place by sharing knowledge, ideas and anything that you can give that comes from the heart.