F. to count numbers of DOB as loose number

jabakka

New Member
Joined
Jun 7, 2019
Messages
6
Hi Mr. Excellers,

I am working on a personal project where I am making a excel sheet, where I want to calculate Life numbers from the Day of birth of persons, based on the book of Dann Millman "The life your where born to live".

It goes as follow; you take a DOB and you count the loose numbers as separates.
so the person with the DOB 01-01-1998 will be: 0+1+0+1+1+9+9+8 = 29
and after that the 29 will be counted as 2+9= 11
Than you put them next to each other 29/11

in other words: Is it possible to use a formula to count all the numbers of a DOB as separate and show the outcome?

Many thanks in advance

PS: sorry for my bad english, it's not my native language.
 
Updated Power Query solution.

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"DOB", type date}}),
    LeftSide = Table.AddColumn(#"Changed Type", "pt1", each List.Accumulate(Text.ToList(Text.Replace(Text.From([DOB]),"/","")),0,(state,current)=>state + Number.From(current))),
    RightSide = Table.AddColumn(LeftSide, "pt2", each List.Accumulate(Text.ToList(Text.From([pt1])),0,(state,current)=>state + Number.From(current))),
    Merge = Table.CombineColumns(Table.TransformColumnTypes(RightSide, {{"pt1", type text}, {"pt2", type text}}, "en-US"),{"pt1", "pt2"},Combiner.CombineTextByDelimiter("/", QuoteStyle.None),"Merged")
in
    Merge
 
Last edited:
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Thanks for all the answers.

Since I am not that advanced in excel and because I can't get any of the examples to work, I want to use the simplest array formula given in your reply.

I copied a DOB to A1 as revered to, in the given formula and pasted your array formula to B1. I'm getting "Err:501".
I used the Ctrl+Shift+Enter method for array formulas as well as Insert>functions>formula and pressing the array function (using Librecalc but saving as .xls format).

It does not seem to work. Is there something I missed?
See this dropbox link for the excel file
 
Upvote 0
If you'll use MS Excel with xlsx extension not LibreOffice formula will work
 
Last edited:
Upvote 0
I asked about Excel version not LibreOffice but if it works for you that's ok

Have a nice day
 
Upvote 0
A possible solution using built-in functions


A
B
1
Date​
Result​
2
01/01/1998​
29/11​
3
12/01/1998​
31/4​
4
01/01/2003​
7/7​
5
01/01/1900​
12/3​
6
12/12/2020​
10/1​
7
14/06/1984​
33/6​

Formula in B2 copied down
=SUMPRODUCT(--(MID(TEXT(A2,"ddmmyyyy"),ROW(A$1:A$8),1)))&"/"&SUMPRODUCT(--("0"&MID(SUMPRODUCT(--(MID(TEXT(A2,"ddmmyyyy"),ROW(A$1:A$8),1))),ROW(A$1:A$8),1)))

M.
 
Upvote 0

Forum statistics

Threads
1,214,540
Messages
6,120,106
Members
448,945
Latest member
Vmanchoppy

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