Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default Function to count numbers in one Cell IE 1+2+10

I'm having difficulty finding a function to count a series of numbers in a
single cell.

Heres an example of the data, 1+10+4+5+15+1

So the total should be 36 but since the user writes this info in one cell,
and 'sum of that cell' doesn't seem to work, is there something function
wise, simple that I'm missing?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function to count numbers in one Cell IE 1+2+10

On Thu, 30 Aug 2007 11:22:02 -0700, Mitch
wrote:

I'm having difficulty finding a function to count a series of numbers in a
single cell.

Heres an example of the data, 1+10+4+5+15+1

So the total should be 36 but since the user writes this info in one cell,
and 'sum of that cell' doesn't seem to work, is there something function
wise, simple that I'm missing?

Thanks


You could select the cell, then put an = or + sign in front of the 1 (on the
formula bar).

Or you could use a VBA function or macro to evaluate the contents.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 515
Default Function to count numbers in one Cell IE 1+2+10

Just add an "=" before your figures
--
Hth

Kassie Kasselman
Change xxx to hotmail


"Mitch" wrote:

I'm having difficulty finding a function to count a series of numbers in a
single cell.

Heres an example of the data, 1+10+4+5+15+1

So the total should be 36 but since the user writes this info in one cell,
and 'sum of that cell' doesn't seem to work, is there something function
wise, simple that I'm missing?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default Function to count numbers in one Cell IE 1+2+10

Except we need to keep that one field with all the ones. The only other thing
I can think of is to copy the contents over to the neighbouring field, then
have it sum it.

Just wish I knew a quick way of doing it automatically.

"kassie" wrote:

Just add an "=" before your figures
--
Hth

Kassie Kasselman
Change xxx to hotmail


"Mitch" wrote:

I'm having difficulty finding a function to count a series of numbers in a
single cell.

Heres an example of the data, 1+10+4+5+15+1

So the total should be 36 but since the user writes this info in one cell,
and 'sum of that cell' doesn't seem to work, is there something function
wise, simple that I'm missing?

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default Function to count numbers in one Cell IE 1+2+10

Except we need to keep that one field with all the ones. The only other thing
I can think of is to copy the contents over to the neighbouring field, then
have it sum it.

I'm not familiar with running macros. I'll see what I can do, or if you have
a suggestion. I made a macro, but obviously it only takes from H26, and
pastes static info. Is there a way to select the field your beside
(neighbouring field to the left, copy and add = in front of 'whatever it
grabs'?


Range("H26").Select
Selection.Copy
Range("I26").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=" + H26
Range("I27").Select
End Sub

"Ron Rosenfeld" wrote:

On Thu, 30 Aug 2007 11:22:02 -0700, Mitch
wrote:

I'm having difficulty finding a function to count a series of numbers in a
single cell.

Heres an example of the data, 1+10+4+5+15+1

So the total should be 36 but since the user writes this info in one cell,
and 'sum of that cell' doesn't seem to work, is there something function
wise, simple that I'm missing?

Thanks


You could select the cell, then put an = or + sign in front of the 1 (on the
formula bar).

Or you could use a VBA function or macro to evaluate the contents.
--ron



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Function to count numbers in one Cell IE 1+2+10

Mitch

Ron mentioned using a User Defined Function.


Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function


With 1+10+4+5+15+1 in A1 enter =EvalCell(A1) in B1

With your workbook open hit Alt + F11 to open the VBE.

CTRL + r to open Project Explorer.

Select your workbook/project and Right-clickInsertModule.

Copy/paste the above Function into that module.


Gord Dibben MS Excel MVP

On Thu, 30 Aug 2007 12:30:04 -0700, Mitch
wrote:

Except we need to keep that one field with all the ones. The only other thing
I can think of is to copy the contents over to the neighbouring field, then
have it sum it.

Just wish I knew a quick way of doing it automatically.

"kassie" wrote:

Just add an "=" before your figures
--
Hth

Kassie Kasselman
Change xxx to hotmail


"Mitch" wrote:

I'm having difficulty finding a function to count a series of numbers in a
single cell.

Heres an example of the data, 1+10+4+5+15+1

So the total should be 36 but since the user writes this info in one cell,
and 'sum of that cell' doesn't seem to work, is there something function
wise, simple that I'm missing?

Thanks


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function to count numbers in one Cell IE 1+2+10

On Thu, 30 Aug 2007 12:48:02 -0700, Mitch
wrote:

Except we need to keep that one field with all the ones. The only other thing
I can think of is to copy the contents over to the neighbouring field, then
have it sum it.

I'm not familiar with running macros. I'll see what I can do, or if you have
a suggestion. I made a macro, but obviously it only takes from H26, and
pastes static info. Is there a way to select the field your beside
(neighbouring field to the left, copy and add = in front of 'whatever it
grabs'?


Range("H26").Select
Selection.Copy
Range("I26").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=" + H26
Range("I27").Select
End Sub

"Ron Rosenfeld" wrote:

On Thu, 30 Aug 2007 11:22:02 -0700, Mitch
wrote:

I'm having difficulty finding a function to count a series of numbers in a
single cell.

Heres an example of the data, 1+10+4+5+15+1

So the total should be 36 but since the user writes this info in one cell,
and 'sum of that cell' doesn't seem to work, is there something function
wise, simple that I'm missing?

Thanks


You could select the cell, then put an = or + sign in front of the 1 (on the
formula bar).

Or you could use a VBA function or macro to evaluate the contents.
--ron


Macro would be simply:

==================
Function eval(rg As Range)
eval = Evaluate(rg.Text)
End Function
=====================
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add/count numbers in the same cell in excel worksheet? Brecken Excel Worksheet Functions 5 January 11th 07 07:44 PM
How can I reference a cell as the criteria in a count if function. RobA Excel Discussion (Misc queries) 1 August 17th 05 06:41 PM
how to count occurence of numbers separated by , in a single cell kish20 Excel Worksheet Functions 3 June 10th 05 07:49 AM
"count if" function based on value of another cell Anauna Excel Worksheet Functions 3 February 24th 05 06:33 PM
can you perform a character count per cell with numbers? Amy Excel Discussion (Misc queries) 1 February 17th 05 10:29 PM


All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"