SUM Formula for first 4 values in column that includes blank cells

chrisb182

New Member
Joined
Mar 3, 2022
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
Hi,

This is my 1st post to the site, so apologies if this question has already been asked.

I have a column in a spreadsheet (AA) where values will appear depending on results in other cells.

My question is, is there a formula to SUM the first 4 numbers in the column, bearing in mind that the cells above it contain a formula? (in this instance the SUM of AA70-73).

Mr Excel.JPG


For reference, next week cell AA69 will contain a value (depending on results elsewhere in the workbook), so in that instance I would need the formula to SUM the values in AA69-72.

I hope this all makes sense!?

Cheers,

Chris
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUM(AA2:INDEX(AA2:AA100,AGGREGATE(15,6,(ROW(AA2:AA100)-ROW(AA2)+1)/(ISNUMBER(AA2:AA100)),4)))
 
Upvote 0
Hi. That seems to work fine.

Thank you very much for your reply.

Chris
 
Upvote 0
If there are no gaps in the numbers once they start, as it appears from your image and description, this may also be a possibility for you.

With normal entry:
Excel Formula:
=SUM(AA2:INDEX(AA2:AA100,MATCH(TRUE,INDEX(AA2:AA100<>"",0),0)+3))

Or with Ctrl+Shift+Enter, not just Enter formula confirmation
Excel Formula:
=SUM(AA2:INDEX(AA2:AA100,MATCH(TRUE,AA2:AA100<>"",0)+3))
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

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