#  Other Applications & Softwares  > Access Tables & Databases >  >  Grouping Logic Based on Qty

## jarett

I have a set a data that is sorted to have a C- item code to be the first line of the PurchaseOrder# then all the items that go with the C- item right below it.  I need to figure out how I can make the C- item line and the items that go with it have a "group 1 number", this would be another column/field.  Any items not falling under this would be "group 2".  In the example attached "PurchaseOrder"=0002151 would only have 1 group because the C- item is a qty of 1 and there is only 1 item below it.  On "PurchaseOrderNo"=0002172 would have 2 groups, C-ACTLIN01 and the 24 items below it would be group 2 and the 3 lines above the C-ACTLIN01 would be group 1.  Any ideas on best way to do this?

----------


## alansidman

crossposted:  https://www.mrexcel.com/board/thread.../#post-5784817

Rule 03: Cross-posting Without Telling Us

Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

Post a link to any other forums where you have asked the same question. 

Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

Read *this* to understand why we ask you to do this.

*I have added the crosspost reference for you today.  Please comply with this and all our rules in the future*

----------

