Forum Discussion
Mar777iam
Oct 25, 2022Copper Contributor
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...
- Oct 26, 2022you 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
mtarler
Oct 26, 2022Silver Contributor
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
=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
Mar777iam
Oct 26, 2022Copper Contributor
Thank you so much! I used the index function and it worked like a charm!