Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

How to summarize data using VBA

  Asked By: Rainhard    Date: Feb 19    Category: MS Office    Views: 2321
  

I have huge material data in excel like below & want to summarize
according to PO & RR reference, e.g there show only one line where PO & RR
are same (PO5249 & RR3104 shows both currencies total in one line). Here
line # 1,2,3 & 8 should summarize & show only one row with total like KR =
2,435 (525+535+550+825) & USD = 41.71 (8.79+9.89+9.21+13.82).
This is like "distinct" function in query.

NC Books Vendor Name LOG Vr PO RR
Ref Cur KR USD
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3104 LOG
6552 REF 636 PO 5249 REC NO 3104 USD 525 8.79
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3104 LOG
6552 REF 636 PO 5249 REC NO 3104 USD 535 9.89
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3104 LOG
6552 REF 636 PO 5249 REC NO 3104 USD 550 9.21
2402001 21 PESHAWAR AUTOS 5953 342 5164 3012 LOG 5953
REF 342 PO 5164 REC NO 3012 USD 600 10.05
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3107 LOG
6552 REF 636 PO 5249 REC NO 3107 USD 725 12.14
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3107 LOG
6552 REF 636 PO 5249 REC NO 3107 USD 750 12.56
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3108 LOG
6552 REF 636 PO 5249 REC NO 3108 USD 780 13.07
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3104 LOG
6552 REF 636 PO 5249 REC NO 3104 USD 825 13.82
2402001 21 PESHAWAR AUTOS 5953 342 5164 3012 LOG 5953
REF 342 PO 5164 REC NO 3012 USD 900 15.08
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3109 LOG
6552 REF 636 PO 5249 REC NO 3109 USD 900 15.08
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3109 LOG
6552 REF 636 PO 5249 REC NO 3109 USD 1250 20.94
................................................................................\

2402001 21 ROYAL AUTO PARTS 6552 636 5249 3109 LOG
6552 REF 636 PO 5249 REC NO 3109 USD 1360 22.78
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3111 LOG
6552 REF 636 PO 5249 REC NO 3111 USD 1525 25.54
2402001 21 PESHAWAR AUTOS 5953 342 5164 3012 LOG 5953
REF 342 PO 5164 REC NO 3012 USD 1600 26.81
2402001 21 ROYAL AUTO PARTS 6552 636 5249 3111 LOG
6552 REF 636 PO 5249 REC NO 3111 USD 1700 28.46
2402001 21 PESHAWAR AUTOS 5953 342 5164 3012 LOG 5953
REF 342 PO 5164 REC NO 3012 USD 2000 33.51

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Michele Grant     Answered On: Feb 19

Did the posting wrap so that these are actually single line  records?
I'm having trouble figuring out what the columns are.
It looks like:
A | B | C | D
NC | Books | Vendor Name | LOG
2402001 | 21 | ROYAL AUTO PARTS | 6552

But somehow, after that the columns don't seem to line up...

if you can give me a better example of the data, I think I can help.

 
Didn't find what you were looking for? Find more on How to summarize data using VBA Or get search suggestion and latest updates.




Tagged: