Posts by alansidman

    1. Your data is not presented consistently in your spreadsheet. Sometimes you have Test-1 and other times you have Test -1. Spacing is importing in the formattting of your data to get proper results.

    2. An alternative solution is using Power Query to split your data and then unpivot it.

    3. Once unpivoted, it is loaded into the Data Model (Power Pivot)

    4. In Power Pivot, create a new measure using concatenex (DAX feature)


    You can see it all in the attached file.

    For starters, I would add at the beginning


    Code
    1. Application.ScreenUpdating = False


    and before End Sub


    Code
    1. Application.ScreenUpdating = True

    additionally, you may wish to turn automatic calculations off

    This can be quickly accomplished using power Query to unpivot the columns. Here is the Mcode


    Code
    1. let
    2. Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    3. #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}),
    4. #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Entry ID", "Nominator Name", "Reason for nomination", "Nomination Type", "Value", "Status", "Award Amount", "Group size", "Date"}, "Attribute", "Value.1"),
    5. #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
    6. in
    7. #"Removed Columns"

    MCode

    select your range/table (blue)

    Data - From Table

    it will open Power Query Editor

    find and open Advanced Editor

    replace whole code there with code from the post

    be sure the name of the source table is the same as in the code (here: Table1)

    Done

    Close&Load


    Review PQ

    In the attached file

    Click on any cell in the new table

    On the Data Tab, click on Queries & Connections

    In the right window, double click to open Query

    Review PQ steps

    M-code basics:

    - "let" is the start of a query

    - "in" is the closing of a query

    - each transformation step sits in between those 2 lines

    - each step line is ended by a comma, except the last one

    - "Source" is always the first step (Source Data)

    - After "in" you have the last step referenced

    Quote

    I want to know what those matching common part number is for all of the suppliers.

    Please give an example of what this means using the data you supplied. I am not sure what you are asking and what you wish to be displayed. Smaller samples with a before and after scenario would seriously help to get your a bona fide solution.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").



    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.



    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.



    - Follow this link for an introduction to Power Query functionality.



    - Follow this link for a video which demonstrates how to use Power Query code provided.

    I did it with Power Query.


    Code
    1. let
    2. Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    3. #"Changed Type" = Table.TransformColumnTypes(Source,{{"Branch", Int64.Type}, {"Emp ID", Int64.Type}, {"Date", type date}, {"Shift Time", type text}}),
    4. #"Grouped Rows" = Table.Group(#"Changed Type", {"Branch", "Date", "Shift Time"}, {{"MIn", each List.Min([Emp ID]), type nullable number}, {"Max", each List.Max([Emp ID]), type nullable number}})
    5. in
    6. #"Grouped Rows"

    I would do it with Power Query. Here is the Mcode and a sample file based upon what you provided.


    Files

    • Book4.xlsx

      (26.77 kB, downloaded 38 times, last: )