TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 270
- Office Version
- 365
- Platform
- Windows
Hello,
I hope someone can help.
I have data which is sorted by property code (column B). There is always more than one row per property (sometimes 2, sometimes 4 or 5). Columns C-AA contain various financial metrics associated with the property.
What I would like to do is use a macro to loop through the data and sum the values in columns C-AA per property. After, I would need to zero these values apart from one of the rows.
Probably easier if I supply a small, cut-down sample with what I'm trying to do.
This is my before scenario:
And this is what the macro would do:
Any help greatly appreciated. Thank you for reading.
I hope someone can help.
I have data which is sorted by property code (column B). There is always more than one row per property (sometimes 2, sometimes 4 or 5). Columns C-AA contain various financial metrics associated with the property.
What I would like to do is use a macro to loop through the data and sum the values in columns C-AA per property. After, I would need to zero these values apart from one of the rows.
Probably easier if I supply a small, cut-down sample with what I'm trying to do.
This is my before scenario:
Code:
Property Code Value1 Value2 Value3 Value4 Value5
ABCDEFGHIJK01 1000 200 1200 900 750
ABCDEFGHIJK01 1200 700 1000 400 550
And this is what the macro would do:
Code:
Property Code Value1 Value2 Value3 Value4 Value5
ABCDEFGHIJK01 0 0 0 0 0
ABCDEFGHIJK01 2200 900 2200 1300 1300
Any help greatly appreciated. Thank you for reading.