Formula help

%3CLINGO-SUB%20id%3D%22lingo-sub-2873761%22%20slang%3D%22en-US%22%3EFormula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2873761%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20need%20help%20with%20an%20excel%20formula%20please%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20data%20in%20column%20A%20and%20a%20running%20total%20in%20column%20B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20want%20to%20know%20the%20difference%20between%20the%20figures%20in%20column%20B%20but%20the%20number%20of%20blank%20spaces%20differs%20is%20there%20a%20way%20I%20can%20get%20the%20difference%20between%20the%20next%20figure%20and%20the%20last%20despite%20the%20number%20of%20blank%20spaces%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20done%20it%20for%20C6%20and%20C10%20but%20as%20there%20is%20only%201%20blank%20space%20on%20the%20next%20equation%20the%20formula%20is%20wrong%20if%20I%20paste%20the%20sum%20into%20C12%20it%20does%26nbsp%3B%3DSUM(B12-B8)%20which%20is%20wrong%20and%20needs%20to%20be%26nbsp%3B%3DSUM(B10-B8)%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAfter%20this%20I%20am%20wanting%20to%20put%20into%20column%20D%20the%20addition%20of%20the%20figures%20in%20coulm%20A%20to%20ensure%20column%20C%20and%20D%20are%20the%20same%20but%20again%20the%20length%20of%20the%20equation%20will%20differ%20each%20time%3CBR%20%2F%3E%3CBR%20%2F%3EI%20hope%20this%20makes%20sense%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%20is%20greatly%20appreciated%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-10-22%20135006.jpg%22%20style%3D%22width%3A%20837px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319245iDF92EC2DA6821E30%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-10-22%20135006.jpg%22%20alt%3D%22Screenshot%202021-10-22%20135006.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-10-22%20135454.jpg%22%20style%3D%22width%3A%20813px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319250i204293375943EDE9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-10-22%20135454.jpg%22%20alt%3D%22Screenshot%202021-10-22%20135454.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2873761%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2874208%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2874208%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1193108%22%20target%3D%22_blank%22%3E%40nikiw%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELeave%20C2%20empty%2C%20obviously.%3C%2FP%3E%0A%3CP%3EEnter%20the%20following%20formula%20in%20C3%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(B3%3D%22%22%2C%22%22%2CB3-LOOKUP(9.99999999999999E%2B307%2CB%242%3AB2))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EAnd%20in%20D3%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(B3%3D%22%22%2C%22%22%2CSUM(INDEX(A%3AA%2CMAX((B%242%3AB2%26lt%3B%26gt%3B%22%22)*ROW(B%242%3AB2)%2B1))%3AA3))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIf%20you%20don't%20have%20Microsoft%20365%2FOffice%202021%20you'll%20have%20to%20confirm%20the%20formula%20with%20Ctrl%2BShift%2BEnter.%3C%2FP%3E%0A%3CP%3EFill%20down%20from%20C3%3AD3%20to%20the%20last%20row%20with%20data%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello! 

I need help with an excel formula please

I have data in column A and a running total in column B

I want to know the difference between the figures in column B but the number of blank spaces differs is there a way I can get the difference between the next figure and the last despite the number of blank spaces?

I have done it for C6 and C10 but as there is only 1 blank space on the next equation the formula is wrong if I paste the sum into C12 it does =SUM(B12-B8) which is wrong and needs to be =SUM(B10-B8)


After this I am wanting to put into column D the addition of the figures in coulm A to ensure column C and D are the same but again the length of the equation will differ each time

I hope this makes sense 

Any help is greatly appreciated 

Screenshot 2021-10-22 135006.jpg

Screenshot 2021-10-22 135454.jpg

1 Reply

@nikiw 

Leave C2 empty, obviously.

Enter the following formula in C3:

=IF(B3="","",B3-LOOKUP(9.99999999999999E+307,B$2:B2))

And in D3:

=IF(B3="","",SUM(INDEX(A:A,MAX((B$2:B2<>"")*ROW(B$2:B2)+1)):A3))

If you don't have Microsoft 365/Office 2021 you'll have to confirm the formula with Ctrl+Shift+Enter.

Fill down from C3:D3 to the last row with data,