Excel Macro to list current costs by code and extract previous
Closed
DutchYorks
Posts
2
Registration date
Tuesday March 4, 2014
Status
Member
Last seen
March 6, 2014
-
Mar 5, 2014 at 07:51 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 17, 2014 at 11:37 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 17, 2014 at 11:37 AM
Related:
- Excel Macro to list current costs by code and extract previous
- Battery reset code - Guide
- Whatsapp country code list - Guide
- Samsung volume increase code - Guide
- How to get whatsapp verification code online - Guide
- How to change your best friends list on snapchat to 3 - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Mar 6, 2014 at 11:33 AM
Mar 6, 2014 at 11:33 AM
Hi Dutch,
Can you give an example, as I have a hard time understanding what you are trying to do.
Best regards,
Trowa
Can you give an example, as I have a hard time understanding what you are trying to do.
Best regards,
Trowa
Mar 6, 2014 at 12:35 PM
MONTH ONE COSTS FORECAST BUDGETS
CODE 1 4 3
XXX1 3 5 2
XXX3 4 6 3
XX4 4 2 4
MONTH 2
COSTS FORECAST BUDGETS
CODE 6 9 8
XXX1 8 10 7
XXX3 9 11 8
XX4 9 7 9
CODES COULD BE UP TO 1000 LINES
WOULD LIKE A MACRO THAT CAN EXTRACT ONE MONTH FROM THE OTHER FOR ALL THE HEADINGS BY CODE AND THANKS IN ADVANCE IF IT CAN BE DONE.
Mar 10, 2014 at 11:41 AM
What do you mean by "extract"? Do you want to add, subtract, something else?
Can you give result example?
Best regards,
Trowa
Mar 12, 2014 at 02:10 PM
current month and one for the previous month. Each line entry will have a separate code for a particular costs. Therefore, I would like to extract the current months code with costs and subtract the previous month, same code and see what the difference is between the two months. Does that help look above I did a list before. Your anticipated help is appreciated.
Dutch
Mar 13, 2014 at 12:02 PM
I am assuming that your actual data doesn't look as nice as your sample data, or else you could just use formula's.
The following Macro will loop through the codes in column A (starting at row 2) on "Sheet2" (this is the name I gave to the sheet with the data from month 2).
These codes are compared to the codes in column A (starting at row 2) on "Sheet1" (this is the name I gave to the sheet with the data from month 1).
When a match is found the values from Sheet1 are subtracted from Sheet2 and placed (along with the code) in the sheet called "Balance" at the first available row.
So change the sheet names in the Macro to match yours and give this a try:
Let me know how this works out for you.
Best regards,
Trowa
Mar 13, 2014 at 04:11 PM