• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Kindly share Formula for get date from Multiple invoice numbers date to one invoice number

bhanurapelli

New Member
Dear,

Kindly share Formula for get date from Multiple invoice numbers date to one invoice number;

Multiple Invoice NumbersDocument Receipt dateSearch Invoice NumberDocument Receipt date
100457692/100457707/10045770817.10.2022100457708???
100457856/10045785718.10.2022100457717???
100457013/100457717/100457718/10045771919.10.2022100457711???
100457718???
100457857???
 
Power Query solution

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table5"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Document Receipt date", type date}}),
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Changed Type", {{"Multiple Invoice Numbers", Splitter.SplitTextByDelimiter("/", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Multiple Invoice Numbers")
in
    #"Split Column by Delimiter"

Excel 2016 (Windows) 64 bit
A
B
C
D
E
1
Multiple Invoice NumbersDocument Receipt dateMultiple Invoice NumbersDocument Receipt date
2
100457692/100457707/100457708
10/17/2022​
100457692
10/17/2022​
3
100457856/100457857
10/18/2022​
100457707
10/17/2022​
4
100457013/100457717/100457718/100457719
10/19/2022​
100457708
10/17/2022​
5
100457856
10/18/2022​
6
100457857
10/18/2022​
7
100457013
10/19/2022​
8
100457717
10/19/2022​
9
100457718
10/19/2022​
10
100457719
10/19/2022​
Sheet: Sheet3
 
As a formula to look up dates for the specified order numbers, you could us a wildcard XLOOKUP
Code:
= XLOOKUP("*"&invNum&"*", Multiple, received,"Not known",2)
To do as @AlanSidman has done with Power Query and extract a full list of Invoice Numbers is much harder
Code:
= LET(
      combined, MAP(multiple, received,
         LAMBDA(m,r, TEXTJOIN(";",,TEXTSPLIT(m,"/")&","&TEXT(r,"dd/mm/yy")))),
      list, REDUCE({" Number"," Receipt date"}, combined,
         LAMBDA(output,pairs, VSTACK(output, TEXTSPLIT(pairs,",",";")))),
      SORT(list,,1)
      )
81393
 
Back
Top