Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anil S
  Where is Anil S?
 Anil S
Subject: Excel formula or function or macro code
Thread ID: 395480 Message ID: 395480 # Views: 46 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Microsoft Office Automation
Date: Wednesday, January 15, 2014 11:11:42 AM         

Good day to all :-)
I have a sheet of Excel in which an item can have different numbers and quantity like following.


Similarly there are thousands of records in which an item has different numbers and quantity.
My task is:
1. take item
2. add quantities of same number of that item like aaaa has number 2 and 4 and the number two has different quantity. so I will sum 50 and 60 (110) for number 2 of item aaaa and quantity of number 4 is 30 and quantity of number 5 is 10. now 110 is greater than 30 and 10 so the actual number of item is 2.

Means we just sum the quantities of same number of an item and find the maximum sum and the number that has maximum sum of quantities is the actual number of that item.

Can I do that with any Excel formula or Function or is there any macro code for this that I can implement.

Thanks and Regards,


Excel formula or function or macro code Posted by Anil S @ 1/15/2014 11:11:42 AM
RE: Excel formula or function or macro code Posted by Cetin Basoz @ 1/15/2014 6:08:35 PM