Adding Numbers in a Cell

kwedde01

Board Regular
Joined
Jun 9, 2005
Messages
140
How can I add several numbers in a cell.

For example: Cell A1 would contain the numbers 5,10,6,12,etc.

Each comma represents the end of a number and the start of a new one. How would I then add these 4 numbers in the same cell.
 

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
Need more info.
Cells have just those 4 numbers? Or are there more numbers (based on your "etc." you typed)? Do you mean add as in arithmetic or add as in move to the cell?

Michael
 
Upvote 0
A cell will have anywhere from 23 to 26 numbers entered in that particular cell. The addition is arithmetic add.

So 2,5,3,8 should give a result of 18... The formula is to be used throughout the worksheet
 
Upvote 0
OK
Your saying it may have
18,12,8,2,15,36,44,21,15
And you want to add the 1st 4 numbers? or all numbers?

If it is all numbers, each number is separated by a comma correct?

Michael
 
Upvote 0
Not the first four but all numbers within the cell, an dyes each number is separated by a comma.


Thanks for any help you can offer
 
Upvote 0
With he help of the EVAL function from the Morefunc addin,
Book1
HIJK
35,10,6,12
433
Sheet3


The Morefunc add-in is a free download, available at: this site.
 
Upvote 0
Thanks alot...

Is there another way of doing this? The file will be used on different computers, and hence not everyone will have the morefunc add-in
 
Upvote 0
I saw the following code used in past. It is not mine but I understand it to work.

I can do it with a custom function:


Code:
--------------------------------------------------------------------------------

Function Test(Rng As Range) As Variant 
    Test = Evaluate(Application.Substitute(Rng, ",", "+")) 
End Function 

--------------------------------------------------------------------------------







Then type:

=Test(A1)




Michael
 
Upvote 0
I get an error message of #NAME when i try the Test function.

I try entering 2,3 in cell A1 on a new sheet, and I place the formula in cell b1 but get that error messages

Any suggestions
 
Upvote 0

Forum statistics

Threads
1,211,873
Messages
6,104,495
Members
447,913
Latest member
kowboy_sparrow

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