SMALL function when blank cells

Dave Donut

New Member
Joined
Dec 19, 2012
Messages
27
Office Version
  1. 365
Platform
  1. MacOS
I am using the following function to sum the 5 smallest values in the G column.

=SMALL(G2:G100,1)+SMALL(G2:G100,2)+SMALL(G2:G100,3)+SMALL(G2:G100,4)+SMALL(G2:G100,5)

Many of the cells in the column are blank. The formula works fine when there are 5 or more cells with numbers, but sometimes there are fewer, it returns an error #NUM!.

How can I get it to return the total when there are fewer than 5 cells with numbers?

Many thanks.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thanks for that. (y)
How about
Excel Formula:
=SUM(IFERROR(SMALL(G2:G100,{1,2,3,4,5}),0))
 
Upvote 0
Thanks. When I enter that formula I get this error message.....which is something I get quite frequently...and don't really understand why or how to avoid it..

The cell is formatted as a number...
Screenshot 2022-04-06 at 15.34.14.png
 
Upvote 0
Do you normally use commas as the separator in formulae, or do you use semi-colons?
 
Upvote 0
Commas

I don't really understand when it says Excel thinks it's a formula......it IS a formula.....!
 
Upvote 0
Did you copy/paste the formula or type it out?
 
Upvote 0
Solution
I typed it out - but I used normal braces rather than curly. But now after copying and pasting from your reply....it works!

I haven't encountered curly brackets before....need to learn about them.

So problem solved. Thanks very much!!
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,150
Members
448,552
Latest member
WORKINGWITHNOLEADER

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