cell counter

SGlobal

New Member
Joined
May 10, 2011
Messages
7
Hello,

I am trying to get a loop going. I have a worksheet with a lot of purchase orders with unique order IDs. When a customer orders multiple items through the website, the order is imported in to excel on multiple rows i.e. if a customer orders a black ink cartridge and a color one, the order is imported in to excel on two rows. All the customer information is the same and so is the order number. the only difference is the item name and sku. What I want to be able to do is basically have a macro that goes down the list and counts the number of rows with the same order number and then I have two columns with two different prices. I want to divide those prices by the number of rows counted then move on to the next order number and count the number of rows with that same order number and repeat the process. Let me know if that made any sense at all.

Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Are the cartridges and other items purchased all the same price? If not, why would you divide the total price by the number of orders?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top