+ Reply to Thread
Results 1 to 13 of 13

Want to get the results of mavb for invoices and counts and sorted smallest to largest

  1. #1
    Registered User
    Join Date
    02-08-2022
    Location
    sialkot
    MS-Off Ver
    Microsoft Office Professional Plus 2016 64BIT
    Posts
    60

    Want to get the results of mavb for invoices and counts and sorted smallest to largest

    Dear All,

    kindly find the attachment EXPORT DETAIL MS test.xlsx

    in sheet (mawb) i need results from sheet (D)

    i received mawb(master air way bills) files from courier company
    now i have data in sheet D
    i want all data to fetch from sheet D and if i type the mawb numbers only.

    waiting for your kind reply.
    Attached Files Attached Files
    Last edited by kisiji; 03-08-2022 at 01:27 PM.

  2. #2
    Registered User
    Join Date
    02-08-2022
    Location
    sialkot
    MS-Off Ver
    Microsoft Office Professional Plus 2016 64BIT
    Posts
    60

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    Dear All,

    can any 1 tell me how can i use power query ?

    waiting for your kind reply.

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    Is the end goal to list the file numbers from smallest to largest for the listed MAWB's?
    Otherwise, I don't understand how that column relates to the others, since for example file number 405 is not one of the file numbers for MAWB 092-2112-2452.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,180

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    The sorted numbers to not relate the files in their rows: they are simply a sorted list from Column D entries
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    True.
    Guess that my question should have been are columns B:E necessary, or does the OP just need the results shown in column F?

  6. #6
    Registered User
    Join Date
    02-08-2022
    Location
    sialkot
    MS-Off Ver
    Microsoft Office Professional Plus 2016 64BIT
    Posts
    60

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    Dear All,

    i will type the master numbers i am receiving from courier company in B only ,

    and i want to fetch all data
    C, D, E, F columns automatically.

  7. #7
    Registered User
    Join Date
    02-08-2022
    Location
    sialkot
    MS-Off Ver
    Microsoft Office Professional Plus 2016 64BIT
    Posts
    60

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    dear all,

    Either E counts the commas in C or D or total file numbers,
    i have to print total 4 times of b4
    i have to print total 2 times of b6
    i have to print total 1 times of b2

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    This proposal employs helper columns which may be moved and/or hidden for aesthetic purposes.
    On the D sheet columns AT:AU are populated using: =IF(Table4[@MAWB]="","",Table4[@[INVOICE No]]&IFERROR(", "&INDEX(AT$1:AT1,AGGREGATE(14,6,(ROW(Table4[@MAWB])-ROW(Table4[#Headers]))/(AD$1:AD1=AD2),1)),""))
    On the mawb sheet:
    Column C is populated using: =IFERROR(INDEX(D!AT$2:AT$142,AGGREGATE(14,6,(ROW(D!AT$2:AT$142)-ROW(D!AT$1))/(D!$AD$2:$AD$142=$B22),1)),"")
    Column D is populated using: =IFERROR(INDEX(D!AU$2:AU$142,AGGREGATE(14,6,(ROW(D!AU$2:AU$142)-ROW(D!AU$1))/(D!$AD$2:$AD$142=$B22),1)),"")
    Column E is populated using: =IF(D22="",0,LEN(D22)-LEN(SUBSTITUTE(D22,",",""))+1)
    Column F is populated using: =IFERROR(AGGREGATE(15,6,G$22:J$27/(G$22:J$27<>""),ROWS(F$22:F22)),"")
    Note that column F pulls values from columns G:J which are populated using: =IFERROR(TRIM(MID(SUBSTITUTE(","&$D22&" ",",",REPT(" ",255)),(COLUMNS($G$22:G$22))*255,255))/1,"")
    Let us know if you have any questions.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-08-2022
    Location
    sialkot
    MS-Off Ver
    Microsoft Office Professional Plus 2016 64BIT
    Posts
    60

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    Dear JeteMc


    Thank you very much for solving my very big problem
    a bundle of thanks sir g
    hands up for you

  10. #10
    Registered User
    Join Date
    02-08-2022
    Location
    sialkot
    MS-Off Ver
    Microsoft Office Professional Plus 2016 64BIT
    Posts
    60

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    but unfortunately after applying these all formulas my excel file is now corrupt it doesn't work any more as i had total filled cells were A108 till bc20001 and my excel sheet died

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    Perhaps the problem is with the formulas in columns AT:AU on the D sheet.
    They have been replaced using tables produced by Get & Transform (aka Power Query) as modeled in columns A:E on the New mawb sheet.
    The Advanced Editor code for each table is similar to:
    Please Login or Register  to view this content.
    The File column is now produced using: =IFERROR(INDEX(AllInvoiceNoTable[All Invoice No],MATCH(J2,AllInvoiceNoTable[MAWB],0)),"")
    File No: =IFERROR(INDEX(AllNumTable[All Num],MATCH(J2,AllInvoiceNoTable[MAWB],0)),"")
    The File Counts and Smallest to Largest columns use the same formulas as before with the references changed.
    Also the helper columns highlighted green utilize the same formula as before.
    Let us know if you have any questions.
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    I believe that this will be an improvement over the previous proposal.
    A connection only is produced to the two tables from post #11.
    The two tables are then merged (JoinKind.FullOuter).
    Let us know if you have any questions.
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Want to get the results of mavb for invoices and counts and sorted smallest to largest

    I had tried to upload the Export Detail BI file but even zipped at 2.5 MB it will not upload, so I will try to describe how to apply the Power Query based solution:
    1. Select a cell in Table_1 on the D sheet
    2. From the Data tab select From Table/Range
    3. In the Power Query Editor select Advanced Editor and replace the code with the following:
    Please Login or Register  to view this content.
    4. Select Done
    5. Select Close and Load to then Connection only and then OK
    6. Repeat steps 1 and 2
    7. Replace the Advanced Editor code with:
    Please Login or Register  to view this content.
    8. Repeat steps 4 and 5
    9. From the Data tab select Get Data then From Other Sources and then Blank Query
    10. In the Power Query Editor select Advanced Editor and replace the code with the following:
    Please Login or Register  to view this content.
    11. Select Done
    12. Select Close and Load to and then OK (as Table and New Sheet should already be selected)
    13. Type MAWB in cell F1 and the #'s in F2 and down
    14. Paste the following into cell G2 then drag across to H2 and then down as far as needed:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    15. Paste the following into cell I2 and drag down as far as needed:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    16. Paste the following into cell J2 and drag down as far as needed:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    17. Paste the following into cell K2 then drag down as far as needed and then drag across until there is a blank column:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that the range of columns in step 17 may have to be extended across further then column O and if so the formula in step 16 will need to be adjusted accordingly.
    Let us know if you have any questions.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] help in excel, detect the largest and smallest digit of pick3 zero is the smallest digit *
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-13-2020, 06:14 AM
  2. largest, smallest, 2nd largest & 2nd smallest
    By bittubadri in forum Excel General
    Replies: 27
    Last Post: 11-03-2019, 12:14 AM
  3. [SOLVED] Smallest and largest value problem
    By ofd2008 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-14-2014, 04:10 AM
  4. Sort largest to smallest - VBA
    By Ricardo Mass in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2013, 09:05 AM
  5. Formula to find 2 largest/smallest results across a row
    By Yannou in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2011, 05:22 AM
  6. 3 largest qty and 3 smallest
    By geng in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-09-2010, 12:20 AM
  7. Sorting Largest To Smallest
    By all4excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-24-2007, 10:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1