Hello
I would search for the same ID(duplicates ID) in column D and search for SELLING & SELLING RETURNING in column E and matching INVOICE NO in column B for each ID with column (I) if contains SELLING RETURNING in column E then should subtract QTY for the ID contains SELLING from QTY for the same ID contains SELLING RETURNING then will change TOTAL column for the ID after QTY*UNIT PRICE also will change TOTAL row for the whole invoice ref . after that should deletes the whole invoice ref contains SELLING RETURNING and change calculation in SUMMING row.
so I highlighted yellow rows for the ID when change QTY ,TOTAL column, total ROW , the highlighted by green will delete them after calculation
I highlighted by red for cells how changes after calculation as show in RESULT sheet.
by the way higlighted just for understanding I don't need it.
I hope some body help me to do that.
Bookmarks