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

Multiply the value mentioned post "'-" Sign

Naresh Yadav

Active Member
Respected All,

I need a formula Help that can help me to Multiply the value mentioned post "'-" Sign in first Column (Separate Heading) with the Order Qty
I have atttached the excel file for your kind

SeparateOrder QtyExpected Result
1211332-2|1211088-2|1211007-321211332-4|1211088-4|1211007-6
1211332-4|1211088-431211332-12|1211088-12
6111085-1|6111089-1|6111077-1|6111081-156111085-1|6111089-1|6111077-1|6111081-1
 

Attachments

  • Book4_naresh.xlsx
    9.3 KB · Views: 3
Power Query offering; update the value in the table on the left, then right-click the green table on the right and choose Refresh.
I don't think the last row of your expected results is correct.

Result
1211332-4|1211088-4|1211007-6
1211332-12|1211088-12
6111085-5|6111089-5|6111077-5|6111081-5
 

Attachments

  • Chandoo51116Book4_naresh.xlsx
    18.3 KB · Views: 7
See file. It is 365.
I have changed the file to use a defined name for the Lambda function. The worksheet formula now reads
Code:
= MAP(separate, orderQty, AdjustedQtyλ)
where the function AdjustedQtyλ(sep, qty) is defined to be
Code:
= LET(
    table,    TEXTSPLIT(sep, "-","|"),
    quantity, qty,
    adjusted, TAKE(table,,1) & "-" & quantity*TAKE(table,,-1),
    TEXTJOIN("|",,adjusted)
  )
Not much use without 365 though!
 

Attachments

  • Book4_naresh.xlsx
    16.6 KB · Views: 1
Last edited:
It is a simple formula to adopt Filterxml and Textjoin function if you have Excel 2019 or Excel 2021.

1] Define 2 names as per attachment.

2} In Result column, C2 formula copied down:

=TEXTJOIN("|",,Dig_1&Dig_2)

82894
 

Attachments

  • Book4_naresh (BY).xlsx
    11.6 KB · Views: 3
Last edited:
Back
Top