I want to VBA codes to sum up the range where the material code is ending up.
Please refer my attach file.For an example:-
In this file,please look in col.'B'i.e.'Material' and the code is ending row no.13.I want the range sum in column no.'F' but before look to text 'LA'in column 'C' and remove the text start from 'LA' just after in column 'C'.i.e.cell no.C15.
Is it possible through VBA codes help?
Automatic sum of range where a Material code is end up
-
- 3StarLounger
- Posts: 354
- Joined: 27 Oct 2013, 15:11
- Location: Gurgaon INDIA
Automatic sum of range where a Material code is end up
Regards
Pradeep Kumar Gupta
INDIA
Pradeep Kumar Gupta
INDIA
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Automatic sum of range where a Material code is end up
The attached file contains a macro that will delete the duplicate LA code.
I do not understand from your original post if you need the macro to also create the subtotals or if the subtotal already exists?
I do not understand from your original post if you need the macro to also create the subtotals or if the subtotal already exists?
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- 3StarLounger
- Posts: 354
- Joined: 27 Oct 2013, 15:11
- Location: Gurgaon INDIA
Re: Automatic sum of range where a Material code is end up
Sir,it is the system generated report.System provide 2 G/L codes i.e. start from LA in column 'C' and their same total also.
Here,my requirement is one G/L code in the sheet and total of the range after ending the material code in col.'B'
You have remove the sub total i.e. fine as desired.But the range total is not working.
Please refer the revised attach file.In this file ,I have change a value cell no F8.Now,the sum should come as 2,853,240.37 instead of 2,848,295.79
Here,my requirement is one G/L code in the sheet and total of the range after ending the material code in col.'B'
You have remove the sub total i.e. fine as desired.But the range total is not working.
Please refer the revised attach file.In this file ,I have change a value cell no F8.Now,the sum should come as 2,853,240.37 instead of 2,848,295.79
Regards
Pradeep Kumar Gupta
INDIA
Pradeep Kumar Gupta
INDIA
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Automatic sum of range where a Material code is end up
Give the following a try...
It deletes the duplicate and creates new subtotals that will add up if changes are made.
It deletes the duplicate and creates new subtotals that will add up if changes are made.
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Automatic sum of range where a Material code is end up
I made a small adjustment to the macro to make it run more optimized (faster)
If you are happy with the macro, please use this version (attached) as it is better...
If you are happy with the macro, please use this version (attached) as it is better...
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- 3StarLounger
- Posts: 354
- Joined: 27 Oct 2013, 15:11
- Location: Gurgaon INDIA
Re: Automatic sum of range where a Material code is end up
Yes,it is faster than earlier.Working fine.Glad.............to find it.Thanks a lot sir.
Regards
Pradeep Kumar Gupta
INDIA
Pradeep Kumar Gupta
INDIA
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Automatic sum of range where a Material code is end up
Glad I could help.
Have a wonderful day.
Have a wonderful day.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.