Forum Discussion

Mar777iam's avatar
Mar777iam
Copper Contributor
Oct 25, 2022
Solved

Help with subtracting specific columns and copying the formula down correctly

Hello,   I have what seems a simple problem but I cannot figure out how to fix it. Below is a sample of what I want to accomplish. I have data that is placed vertically and I need to subtract the b...
  • mtarler's avatar
    Oct 26, 2022
    you could "hard code" it with something like:
    =index(B:B,2*row()-25) - index(B:B,2*row()-24)
    or use lookups
    =XMATCH($B14,$B$1:$B$10,0,1)-XMATCH($B14,$B$1:$B$10,0,-1)
    or you could insert 'dummy' lines between each row of the second set so the lines of interest line up and then you could format those 'between' rows to be hidden or small or white on white or use a formula like =IF(ISEVEN(ROW()),B3-B4,"") or ISODD depending on where the table starts

Resources