Function to add all values above the selected cell?

%3CLINGO-SUB%20id%3D%22lingo-sub-3012312%22%20slang%3D%22en-US%22%3EFunction%20to%20add%20all%20values%20above%20the%20selected%20cell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3012312%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EIs%20there%20a%20way%20to%20get%20the%20sum%20of%20all%20of%20the%20values%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eabove%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bthe%20cell%20plus%20the%20value%20in%20the%20cell%20itself%3F%20I%20tried%20doing%20sum(A1%3AA5)%20and%20it%20was%20fine%20for%20that%20cell%20but%20when%20I%20applied%20it%20to%20the%20next%20cell%2C%20it%20did%20sum(A2%3AA6)%20when%20it%20should've%20been%20sum(A1%3AA6).%20is%20there%20a%20way%20to%20do%20that%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3012312%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3012356%22%20slang%3D%22en-US%22%3ERe%3A%20Function%20to%20add%20all%20values%20above%20the%20selected%20cell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3012356%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1231781%22%20target%3D%22_blank%22%3E%40khushi_g5%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22thread-message-content-body-text%20thread-full-message%22%20data-original%3D%22%22%3E%0A%3CP%20data-prewrap%3D%22true%22%3EUse%3C%2FP%3E%0A%3CP%20data-prewrap%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20data-prewrap%3D%22true%22%3E%3DSUM(A%241%3AA5)%3C%2FP%3E%0A%3CP%20data-prewrap%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22%22%20data-prewrap%3D%22true%22%3EThe%20%24%20makes%20the%20row%20number%201%20absolute%2C%20i.e.%20it%20%22fixes%22%20it.%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Is there a way to get the sum of all of the values above the cell plus the value in the cell itself? I tried doing sum(A1:A5) and it was fine for that cell but when I applied it to the next cell, it did sum(A2:A6) when it should've been sum(A1:A6). is there a way to do that?

1 Reply

@khushi_g5 

Use

 

=SUM(A$1:A5)

 

The $ makes the row number 1 absolute, i.e. it "fixes" it.