Excel Macro to list current costs by code and extract previous
Closed
DutchYorks
Posts
2
Registration date
Tuesday 4 March 2014
Status
Member
Last seen
6 March 2014
-
5 Mar 2014 à 07:51
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Moderator Last seen 27 December 2022 - 17 Mar 2014 à 11:37
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Moderator Last seen 27 December 2022 - 17 Mar 2014 à 11:37
Hello, I am looking for a macro, that will list one set of values by a code and then move a precious list of codes with values and subtract one from the other and leave a balance. Does anyone know how to do this? Your anticipated co-operation and assistance in this matter is appreciated.
Regards
Dutch
Regards
Dutch
Related:
- Excel Macro to list current costs by code and extract previous
- Whatsapp country code list - Guide
- Cs 1.6 code - Guide
- Samsung volume increase code - Guide
- Battery reset code - Guide
- How to change your best friends list on snapchat to 3 - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Moderator
Last seen
27 December 2022
555
6 Mar 2014 à 11:33
6 Mar 2014 à 11:33
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
6 Mar 2014 à 12:35
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.
10 Mar 2014 à 11:41
What do you mean by "extract"? Do you want to add, subtract, something else?
Can you give result example?
Best regards,
Trowa
12 Mar 2014 à 14:10
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
13 Mar 2014 à 12:02
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
13 Mar 2014 à 16:11