Forum Discussion
CaitlynEXCEL
Jul 30, 2022Copper Contributor
How to subtract from the same user
I know I can just do something like =E4-B6 but is there a way for it to look up by the User ID and subtract the quantities with matching Users?
sivakumarrj
Jul 30, 2022Brass Contributor
It seems that USER ID is suffix with quantity, better remove brackets and numbers, then YOU can do easily vlookup and index match for substraction
Without removal of quantity from user id just follow ,
A B D E F
KOCEB96(113) 123 KOCEB96(133) 241 118
KOCE7N9(117) 107 KOCE7N9(235) 235 128
=VLOOKUP(D2,$D$1:$E$8,2,0)-VLOOKUP(LEFT(D2,7)&"*",$A$1:$B$8,2,0)
Without removal of quantity from user id just follow ,
A B D E F
KOCEB96(113) 123 KOCEB96(133) 241 118
KOCE7N9(117) 107 KOCE7N9(235) 235 128
=VLOOKUP(D2,$D$1:$E$8,2,0)-VLOOKUP(LEFT(D2,7)&"*",$A$1:$B$8,2,0)