+ Reply to Thread
Results 1 to 35 of 35

Formulas for Latest Service Details

  1. #1
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Formulas for Latest Service Details

    Hello,

    Can there be formulas to get the latest service details from the Full Service Log sheet based on the selected vehicle in B6 matching the service performed B13:B30?

    The requested formulas will be in Vehicle Service Overview sheet C13:F30.

    Thank you very much
    Attached Files Attached Files
    Last edited by billy60; 03-29-2024 at 10:51 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    There are no expected results manually mocked up ... Please add 2-3 rows to show what's required.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    I changed the workbook to include 2 examples.
    Last edited by billy60; 03-29-2024 at 10:51 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    This would work if you didn't have structured tables:

    =IFERROR(CHOOSECOLS(TAKE(FILTER(LogT[[Column1]:[Column6]],(LogT[Column2]=$B$6)*(LogT[Column4]=$B13)),-1),1,3,5,6),"")

    In the workbook, I converted the table to a range to show it working.
    Last edited by AliGW; 03-29-2024 at 11:05 AM.

  5. #5
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    That's amazing!

    I see that some areas formulas are light gray but some are blank. How does the formula cover the entire range?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    You paste the formula into C13 and drag copy down. It's a dynamic array formula that spills the required results to the right. Where the cells remain blank, there is no data to spill.

    Only column C contains the formula.

  7. #7
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Thank you very much for your help and education.

  8. #8
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: Formulas for Latest Service Details

    If you want to keep the tables you should create a formula for each cell: For example: =XLOOKUP([@Column1],LogT[Column4],LogT[Column1],"",,-1)
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Thank you HansDouwe for your added suggestion and formulas.

  10. #10
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    The lookup isn't considering selected vehicle sorry.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    Which one? Mine is - it references B6.

  12. #12
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Yours works great but HansDouwe does not reference vehicle.

    I am using yours Ali just wanted to mention for others.

  13. #13
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    I appreciate the challenges here considering my limited time.


  14. #14
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    delete comment please
    Last edited by billy60; 03-31-2024 at 09:50 AM.

  15. #15
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Positive attitude matters!

  16. #16
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Formulas for Latest Service Details

    worksheet or Tab name : Vehicle Service Overview

    Cell C13 formula , Drag down and across

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by wk9128; 03-30-2024 at 12:19 AM.

  17. #17
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Thank you kindly

  18. #18
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    disregard comment
    Last edited by billy60; 03-29-2024 at 11:57 PM.

  19. #19
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Formulas for Latest Service Details

    Hi billy60 , Please refer to the attachment for POST # 16 OK or Not ?

  20. #20
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Thanks yes formulas in post #16 also work great! @wk9128
    Last edited by billy60; 03-30-2024 at 03:47 AM.

  21. #21
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    I am using yours Ali just wanted to mention for others.
    Use @UserName to make it clear whom you are addressing in your posts. Thanks.

  22. #22
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Further checking it seems the results are for the oldest date per service not the newest.

    @AliGW can you please check?

    Thank you
    Last edited by billy60; 03-31-2024 at 10:23 AM.

  23. #23
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    Try this instead:

    =IFERROR(CHOOSECOLS(TAKE(FILTER(LogT[[Date]:[Comments]],(LogT[Vehicle]=$D$2)*(LogT[Service Performed]=$B8)),1),1,3,5,6),"")

  24. #24
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Wow that is great! You are truly a master at formulas.

    Thank you so much!

  25. #25
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    No worries. I hadn't realised that the source data was in reverse chronological order!

  26. #26
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Oh darn then I cannot sort the table. It's okay.

  27. #27
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    Yes, you can - hang on a minute.

  28. #28
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    This will sort the range within the formula, so it won't matter what order it is in on the source sheet:

    =IFERROR(CHOOSECOLS(TAKE(SORT(FILTER(LogT[[Date]:[Comments]],(LogT[Vehicle]=$D$2)*(LogT[Service Performed]=$B8)),1,-1),1),1,3,5,6),"")

  29. #29
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Thank you. I really like the tidy way of accomplishing this task with the filtering.

    Is there a reference on how to develop this formula?

  30. #30
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    How do you want to develop it? Or dow you really mean, "How does it work?"

  31. #31
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    How does it work and how can I perhaps use in other situations?

  32. #32
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    How you can use it in other situations is not something I can answer, as I am not you and I am not in any of your situations!

    However, I can break it down for you:

    FILTER(LogT[[Date]:[Comments]],(LogT[Vehicle]=$D$2)*(LogT[Service Performed]=$B8))

    This filters the range LogT[[Date]:[Comments]] where LogT[Vehicle]=$D$2 and LogT[Service Performed]=$B8.

    SORT(...,1,-1)

    This sorts the array returned above using its first column (1) which is the date and then in reverse chronological order (-1), that is from newest to oldest.

    TAKE(...,1)

    This takes the first row from the resulting array (which will be the latest date that the check in question was carried out).

    CHOOSECOLS(...,1,3,5,6)

    This then extracts from that row the columns required (1, 3, 5 and 6).

    IFERROR(...,"")

    Finally we mask any rows that return an error because there's no match.
    Last edited by AliGW; 03-31-2024 at 12:11 PM. Reason: Typo fixed.

  33. #33
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    932

    Re: Formulas for Latest Service Details

    Perfect! Thanks I will save for reference and try it out. Cheers!

  34. #34
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas for Latest Service Details

    No worries.

  35. #35
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Formulas for Latest Service Details

    @billy60 You're Welcome. Glad to help . Thank You for the feedback and rep.

+ 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. Help with formulas for entilement days and service
    By Stephen Reeves in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-07-2023, 06:47 AM
  2. [SOLVED] Formulas For Latest Dates and Mileage Matching Vehicle and Service Description
    By BillySpivy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-28-2022, 08:23 AM
  3. Getting latest version details from 2 columns in excel
    By Shaswat89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-08-2017, 05:17 AM
  4. [SOLVED] \\bms\Service log request\login details\workstation cannot. Check your spelling or try a d
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2014, 10:40 AM
  5. [SOLVED] Formulas for Federal Hours of Service From
    By n2music in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-20-2014, 02:32 AM
  6. Replies: 9
    Last Post: 11-28-2013, 05:20 PM
  7. How to select and reflect the latest details of a customer
    By roaringnoon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2013, 11:25 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