• 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.

New Formula Idea

Qtipsam

New Member
Can someone provide another formula idea to combine to two columns together? I would need the final result to be 060-MIL. I normally use the formula shown, but wondering if there is an easier one. Thank you.

1689179487680.png
 
With Power Query

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Merged Columns" = Table.CombineColumns(Source,{"Pricing Type", "Customer Group"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"Combo")
in
    #"Merged Columns"

Pricing TypeCustomer GroupCombo
060MIL060 MIL
060SHL060 SHL
060ZOO060 ZOO
 
Probably the simplest is the dynamic array version of the OP formula
Code:
= pricingType & "-" & customerGroup

My favourite would be @pascal's Combo4 solution. Maybe taking it a step further to using a named lambda function in place of the inbuilt function TEXTJOIN
Code:
= BYROW(descriptors, TextJoinλ)

where

TextJoinλ
=LAMBDA(a, TEXTJOIN("-", , a))
 
You need the final result to be 060-MIL

Then, try this simply formula in cell C2, copied down:

=TEXT(A2,"000-")&B2

1689464683359.png
 
Back
Top