LearnVBA83
Board Regular
- Joined
- Dec 1, 2016
- Messages
- 113
- Office Version
- 365
- Platform
- Windows
Hi there,
I have a bunch of sheets in a tab that are all hardcoded. Is there a way to write VBA code to look for the word Expense in column B and add the sum functions for C - O?
Things i'm trying to avoid: Sometimes there isn't a number hardcoded which could impact the sum function in VBA. The number of rows in each category can also vary. I'm not great at VBA and formulas but it's almost like the macro would need to find expense, move one cell over, add a sum function upwards until it reaches the cell below the month, and do that for columns C-O each time you see the word expense in column B.
Just trying to replace those hardcoded expense totals with a formula. In the end i'll be trying to loop through a bunch of worksheets to do this with VBA. I'm just trying to do it in steps.
I have a bunch of sheets in a tab that are all hardcoded. Is there a way to write VBA code to look for the word Expense in column B and add the sum functions for C - O?
Things i'm trying to avoid: Sometimes there isn't a number hardcoded which could impact the sum function in VBA. The number of rows in each category can also vary. I'm not great at VBA and formulas but it's almost like the macro would need to find expense, move one cell over, add a sum function upwards until it reaches the cell below the month, and do that for columns C-O each time you see the word expense in column B.
Just trying to replace those hardcoded expense totals with a formula. In the end i'll be trying to loop through a bunch of worksheets to do this with VBA. I'm just trying to do it in steps.