Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
If i have some numbers inside a column, means i enter value 5.8, then Alt+Enter, i enter another value 6.0, then Alt+Enter, follow by value of 8.0, etc Can i calculate the Average or total of the sum in that single column anot? coz if single value inside a single column, i can drag n calculate auto. Any sugguestions? Thanks! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Those values aren't really numeric. They're text entries that just use
numerals. If you have any choice at all in the layout of the data, put each number in a different cell. kyoshirou wrote: Hi, If i have some numbers inside a column, means i enter value 5.8, then Alt+Enter, i enter another value 6.0, then Alt+Enter, follow by value of 8.0, etc Can i calculate the Average or total of the sum in that single column anot? coz if single value inside a single column, i can drag n calculate auto. Any sugguestions? Thanks! -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you have a series of values in a single cell separated by ALT-ENTER, then
1. select the cell 2. Data Text to Columns Delimited Next Other click in the box next to the Other checkbox While holding down the ALT key, touch 010 Finish This will split up the data into individual cells, then addition will be easy. -- Gary''s Student - gsnu200745 "kyoshirou" wrote: Hi, If i have some numbers inside a column, means i enter value 5.8, then Alt+Enter, i enter another value 6.0, then Alt+Enter, follow by value of 8.0, etc Can i calculate the Average or total of the sum in that single column anot? coz if single value inside a single column, i can drag n calculate auto. Any sugguestions? Thanks! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
then all the values will become one only. rest of values r gone.
"Gary''s Student" wrote: If you have a series of values in a single cell separated by ALT-ENTER, then 1. select the cell 2. Data Text to Columns Delimited Next Other click in the box next to the Other checkbox While holding down the ALT key, touch 010 Finish This will split up the data into individual cells, then addition will be easy. -- Gary''s Student - gsnu200745 "kyoshirou" wrote: Hi, If i have some numbers inside a column, means i enter value 5.8, then Alt+Enter, i enter another value 6.0, then Alt+Enter, follow by value of 8.0, etc Can i calculate the Average or total of the sum in that single column anot? coz if single value inside a single column, i can drag n calculate auto. Any sugguestions? Thanks! |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Mon, 17 Sep 2007 17:02:03 -0700, kyoshirou
wrote: Hi, If i have some numbers inside a column, means i enter value 5.8, then Alt+Enter, i enter another value 6.0, then Alt+Enter, follow by value of 8.0, etc Can i calculate the Average or total of the sum in that single column anot? coz if single value inside a single column, i can drag n calculate auto. Any sugguestions? Thanks! It seems your values will all be in a single cell, each on a separate line. If that is the case, then you first have to parse out the values; and then apply the appropriate function. To parse out the values, a UDF is handy. To enter the UDF, <alt-F11 opens the VB Editor. Ensure your project is highlighted in the project explorer window, then Insert/Module and paste the code below into the window that opens. To use this, enter a formula of the type: =SUM(Nums(cell_ref)) =========================================== Option Explicit Function Nums(str As String) As Variant Dim Re As Object Dim MC As Object Dim t() As Double Dim i As Long Set Re = CreateObject("vbscript.regexp") Re.MultiLine = True Re.Global = True Re.Pattern = "^[\-+]?\d*\.?\d+$" If Re.test(str) = False Then Nums = 0 Else Set MC = Re.Execute(str) ReDim t(MC.Count - 1) For i = 0 To UBound(t) t(i) = MC(i) Next i End If Nums = t End Function =============================================== --ron |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
huh? VB again? hahaha
"Ron Rosenfeld" wrote: On Mon, 17 Sep 2007 17:02:03 -0700, kyoshirou wrote: Hi, If i have some numbers inside a column, means i enter value 5.8, then Alt+Enter, i enter another value 6.0, then Alt+Enter, follow by value of 8.0, etc Can i calculate the Average or total of the sum in that single column anot? coz if single value inside a single column, i can drag n calculate auto. Any sugguestions? Thanks! It seems your values will all be in a single cell, each on a separate line. If that is the case, then you first have to parse out the values; and then apply the appropriate function. To parse out the values, a UDF is handy. To enter the UDF, <alt-F11 opens the VB Editor. Ensure your project is highlighted in the project explorer window, then Insert/Module and paste the code below into the window that opens. To use this, enter a formula of the type: =SUM(Nums(cell_ref)) =========================================== Option Explicit Function Nums(str As String) As Variant Dim Re As Object Dim MC As Object Dim t() As Double Dim i As Long Set Re = CreateObject("vbscript.regexp") Re.MultiLine = True Re.Global = True Re.Pattern = "^[\-+]?\d*\.?\d+$" If Re.test(str) = False Then Nums = 0 Else Set MC = Re.Execute(str) ReDim t(MC.Count - 1) For i = 0 To UBound(t) t(i) = MC(i) Next i End If Nums = t End Function =============================================== --ron |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Mon, 17 Sep 2007 18:42:00 -0700, kyoshirou
wrote: hahaha That's a useful and thoughtful response to an attempt to provide you some assistance. I'll try not to make that mistake again. --ron |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes. I appreciate that. And ur fast respond.
"Ron Rosenfeld" wrote: On Mon, 17 Sep 2007 18:42:00 -0700, kyoshirou wrote: hahaha That's a useful and thoughtful response to an attempt to provide you some assistance. I'll try not to make that mistake again. --ron |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What do you mean? The instructions which Gary''s Student gave you will put
your 3 numbers in 3 consecutive columns. -- David Biddulph "kyoshirou" wrote in message ... then all the values will become one only. rest of values r gone. "Gary''s Student" wrote: If you have a series of values in a single cell separated by ALT-ENTER, then 1. select the cell 2. Data Text to Columns Delimited Next Other click in the box next to the Other checkbox While holding down the ALT key, touch 010 Finish This will split up the data into individual cells, then addition will be easy. -- Gary''s Student - gsnu200745 "kyoshirou" wrote: Hi, If i have some numbers inside a column, means i enter value 5.8, then Alt+Enter, i enter another value 6.0, then Alt+Enter, follow by value of 8.0, etc Can i calculate the Average or total of the sum in that single column anot? coz if single value inside a single column, i can drag n calculate auto. Any sugguestions? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|