Alvaroro84
Board Regular
- Joined
- May 13, 2022
- Messages
- 65
- Office Version
- 2016
- Platform
- Windows
I want to be able to use a macro that sum's different cells in the same row based on the headers name
Ex: lets say I want my macro to always sum together the titles sample 1,sample 2, and sample 5 starting with column A2 all the way to the last column. However, in different work books the samples are in different areas so I don't wan to make it contingent on the row number.
Sample 1 | sample 2 | sample 3 | sample 4 | sample 5 | sample 6 |
2 | 2 | 0 | 54 | 20 | 32 |
0 | 5 | 21 | 3 | 152 | 0 |
63 | 3 | 65 | 2 | 0 | 0 |
Ex: lets say I want my macro to always sum together the titles sample 1,sample 2, and sample 5 starting with column A2 all the way to the last column. However, in different work books the samples are in different areas so I don't wan to make it contingent on the row number.