Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is there an easy way to arrange a formula that will Sum all integers of a given number? such that when applied on colum A, the result will be B: 21 3 77 14 12345 15 1 1 321 6 thanks for you help, pchr |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please don't post the same question in multiple Groups.
Regards, Paul "pchr" wrote in message oups.com... Hi, Is there an easy way to arrange a formula that will Sum all integers of a given number? such that when applied on colum A, the result will be B: 21 3 77 14 12345 15 1 1 321 6 thanks for you help, pchr |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 8 Jun, 15:41, pchr wrote:
Hi, Is there an easy way to arrange a formula that will Sum all integers of a given number? Cross posting is a no-no, but on the assumption you may still be waiting for an answer, here is one way to do it. Sub sumNumbers() Dim checkRow As Long Dim instrPosition As Integer Dim summedTotal As Long checkRow = 1 Do summedTotal = 0 For instrPosition = 1 To Len(Range("a" & checkRow).Value) summedTotal = summedTotal + _ Mid(Range("a" & checkRow).Value, instrPosition, 1) Next Range("B" & checkRow).Value = summedTotal checkRow = checkRow + 1 Loop Until Range("a" & checkRow).Value = "" End Sub -- juux |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cross posting is okay, multi-posting is irritating.
" wrote: On 8 Jun, 15:41, pchr wrote: Hi, Is there an easy way to arrange a formula that will Sum all integers of a given number? Cross posting is a no-no, but on the assumption you may still be waiting for an answer, here is one way to do it. Sub sumNumbers() Dim checkRow As Long Dim instrPosition As Integer Dim summedTotal As Long checkRow = 1 Do summedTotal = 0 For instrPosition = 1 To Len(Range("a" & checkRow).Value) summedTotal = summedTotal + _ Mid(Range("a" & checkRow).Value, instrPosition, 1) Next Range("B" & checkRow).Value = summedTotal checkRow = checkRow + 1 Loop Until Range("a" & checkRow).Value = "" End Sub -- juux |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=SUMPRODUCT(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "pchr" wrote in message oups.com... Hi, Is there an easy way to arrange a formula that will Sum all integers of a given number? such that when applied on colum A, the result will be B: 21 3 77 14 12345 15 1 1 321 6 thanks for you help, pchr |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
decrease integers to zero | Excel Worksheet Functions | |||
two integers in one cell | New Users to Excel | |||
Sum all integers of a given number | Excel Worksheet Functions | |||
Seems there is a bug with long integers in VBA | Excel Programming | |||
A list of Consecutive Integers, can I search for missing integers | Excel Worksheet Functions |