Hi Folks,

I would need your dearest help to get an excel formula for the logic as mentioned below:

1) I have an sheet named "Pivot" which contains item details along with its amount related to sales data. What i exactly need is - Excel formula to be updated for the logic-> Wherever negative sign is available in the Units Cost column, mapping key need to be changed accordingly. (example – mapping key for account number "4016000" should be updated as“40” and "607412" should be “50”)

2)If the amount value is positive in Units cost column, then the mapping key needs to be change vise versa ( example - mapping key for account number "607412" should be updated as“40” and "4016000" should be “50”)

Attached the snapshot of pivot data for reference.snap.jpg


Kindly let me know if any other details required. Thanks for your help in advance.