Sum of last three non empty cells.

krispartsbadger

New Member
Joined
May 13, 2022
Messages
23
Office Version
  1. 365
I continually add values to a single row. What is a formula that shows the last 3 cells that have values. So If i have values in A1,A2, A3 A4, it would be the sum of A2-A4. And once I enter a value into A5, the formula will grab the sum of A3-A5 I want to see this rather than always highlighted the last 3. Thanks.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
=SUM(OFFSET(A1, COUNTA(A1:A100)-3,0,3,1))
 
Upvote 0
I continually add values to a single row. What is a formula that shows the last 3 cells that have values. So If i have values in A1,A2, A3 A4, it would be the sum of A2-A4. And once I enter a value into A5, the formula will grab the sum of A3-A5 I want to see this rather than always highlighted the last 3. Thanks.
How about

Excel Formula:
=IFERROR(SUM(OFFSET(A1,LARGE(IF(A2:A100<>"",ROW(A2:A100))-1,3),0,(100-LARGE(IF(A2:A100<>"",ROW(A2:A100))-1,3)),1)),"-")

Few things worth mentioning.
  1. This formula caters to blank cells in between if there are any.
  2. This is for 100 cells. Amend the formula accordingly.
  3. If there are less than 3 values, then it doesn't error out.

1661199456295.png
 

Attachments

  • 1661199329624.png
    1661199329624.png
    23.5 KB · Views: 13
Upvote 0
I am trying to have m1's output achieve 434.61. As soon as I enter $100 into H1, I want M1 to now reflect $503.06. I hope this makes sense.
 

Attachments

  • Screenshot 2022-08-22 153705.png
    Screenshot 2022-08-22 153705.png
    4.6 KB · Views: 9
Upvote 0
I am trying to have m1's output achieve 434.61. As soon as I enter $100 into H1, I want M1 to now reflect $503.06. I hope this makes sense.

Your question above talks about filling values down a column... A1,A2, A3 A4...

If you are filling across a row then see my answer in your OTHER POST
 
Upvote 0
I have no qualms if you select someone elses answer but asking a question and selecting an answer which doesnt even answer your original question. (If you would have selected the answer by @johnnyL in post 2, it would have still been ok as it answers your original question.)

PLUS

ignoring someone elses efforts

PLUS

absense of a simple apology for making the other person waste his time (yes we all are volunteers and in this case it is a waste of time) is kind of sad really...
 
Upvote 0
@Siddharth Rout I think the OP just misspoke a bit in the OP. The OP clearly stated 'a single row', but then went on to mention values down a column.

I continually add values to a single row. What is a formula that shows the last 3 cells that have values. So If i have values in A1,A2, A3 A4, it would be the sum of A2-A4. And once I enter a value into A5, the formula will grab the sum of A3-A5 I want to see this rather than always highlighted the last 3. Thanks.

I believe the post #4 attachment was the clarification to what was being asked.

I also was confused by the OP. I chalked it up to a new user confusing columns and rows, so I offered a solution for down a column. Once I saw post #4, I concluded that the row part in the OP was correct, the addresses were incorrect.

Anyhow, like you said, we are volunteers, we can take a break if we need to & our payrate will stay the same. :) Don't stay discouraged. You are a definite asset here.
 
Upvote 0
Anyhow, like you said, we are volunteers, we can take a break if we need to & our payrate will stay the same. :) Don't stay discouraged. You are a definite asset here.

I think you may have misunderstood the intent of my post. It is not about me nor am I getting discouraged ;)

Anyways, I am going to take a step back from this post.
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top