I've a crystal report that need to show summary by division except one division which would need to be merged with one of the other divisions. The logic to share the merger is as follows. First 3 digits have Division code and the rest 8 digits have common account codes. When it comes to MAI division the account code would match with one of the other divisions. Where ever the account matches with other divisions then that MAI value would be part of the other division summary. How can build a formula to have this summary? Please find below example data.
div code value
ELE ELE40040000 250
MAI MAI40040000 150
MAI MAI40740000 200
MAI MAI43010000 300
PCE PCE40740000 400
REN REN43010000 100
Result
ELE ELE40040000 250
MAI40040000 150
total ELE 400
PCE PCE40740000 400
MAI40740000 200
Total PCE 600
REN REN43010000 100
MAI43010000 300
Total REN 400
Many Thanks in Advance.
div code value
ELE ELE40040000 250
MAI MAI40040000 150
MAI MAI40740000 200
MAI MAI43010000 300
PCE PCE40740000 400
REN REN43010000 100
Result
ELE ELE40040000 250
MAI40040000 150
total ELE 400
PCE PCE40740000 400
MAI40740000 200
Total PCE 600
REN REN43010000 100
MAI43010000 300
Total REN 400
Many Thanks in Advance.