|Hi. I'm a 'dabbler' in VBA (I know, Dangerous! :-) and I've created a macro to custom format raw data concerning customer orders where I work. By looking up forums and learning as I go I've created a very useful tool for report creation / distribution but the report goes to several upper management and higher employees and there's one part that, while mutually understood, is very annoying. |
Basically, the only unique key in the report is the work order number. I also have Sales Order(S.O.) and Line Item of the Sales order. There can be from 1 to 20 work orders per S.O. Line Item but whatever database engine SAP uses doesn't distinguish the individual orders. So, the result is something like this:
S.O. Line Item W.O. Qty
123456 10 111111222 3
123456 10 111111333 3
123456 10 111111444 3
So you can see, the Qty states 3 in every cell when it should actually be 1 whenever the SO and Line Item are the same and the W.O.# is different. I need to know how to parse through each row and change the Qty to the correct quantity dependant on the other 2 cell values. If you need an example of the raw data and then the formatted report please let me know an email address to send to.
Thank you in advance.