autosum

bibbyd01

Board Regular
Joined
Sep 10, 2008
Messages
113
Is there any way to have a cell sum values, without the = sign?

For instance, I have a list of numbers from a printout that needed to be added together. I would normally do =5+9+69+56+95+5 but I was wondering if there's a way of just typing into the cell 5+9+69+56+95+5?

I'm trying to dumb the process down at someone's request, and I'm sure I've seen something somewhere that lets me do this.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
You can also start with just a plus (or minus) sign. Excel will then add the = programatically.
 
Upvote 0
I think I prefer jubjab's solution but if you don't you could try this:

Right click the tab of the worksheet you want to work with, choose 'view code' and paste the following.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If InStr(Target, "+") Then
        Application.EnableEvents = False
        Target.Formula = "=" & Target.Value
        Application.EnableEvents = True
    End If
End Sub

This only takes account of sums entered with plus signs, so if there's any variation likely, it may have to be rewritten to accommodate.
 
Upvote 0
Just for fun, here's another

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Variant, i As Integer, t As Integer
Application.EnableEvents = False
X = Split(Target.Value, "+")
For i = LBound(X) To UBound(X)
    t = t + CInt(X(i))
Next i
Target.Value = t
Application.EnableEvents = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,945
Members
449,275
Latest member
jacob_mcbride

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