Summing numbers only (not formulas)

DaveTJDaniels

New Member
Joined
Dec 29, 2021
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
Hi,

I am trying to sum only hardcoded numbers in a column, and ignore any formulas.

I was hoping that the AGGREGATE function would do the job, but it only ignores subtotals.

Any help you can give would be much appreciated.

many thanks,
David
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
How about this?

MXL 20211228.xlsm
TUV
816
92
103
117
Sheet6
Cell Formulas
RangeFormula
V8V8=sumh(T8:T11)
T11T11=T10*T9+T8


VBA Code:
Function SUMH(r As Range)
Dim c As Range

For Each c In r
    If Not c.HasFormula Then SUMH = SUMH + c.Value
Next c
End Function
 
Upvote 0
I like to use Sumproduct with IsFormula.
replace A2:A6 with your range.

=SUMPRODUCT(--(ISFORMULA(A2:A6)=FALSE),(A2:A6))
 
Upvote 0
Just FYI, if the OP is actually using 2010 per his profile, ISFORMULA is not available.
 
Upvote 0
@bstory84 isformula only appeared in xl2013, so the OP doesn't have it. ;)
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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