+ Reply to Thread
Results 1 to 14 of 14

Get rightmost non-date or text value in a row

Hybrid View

  1. #1
    Registered User
    Join Date
    06-14-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    Question Get rightmost non-date or text value in a row

    We have numerous sheets of thickness readings. They take the form of something similar to:

    ITEM POS BASETHK BASEDATE THICKNESS DATE THICKNESS DATE THICKNESS DATE
    001 A 5.1 11/06/15 4.9 13/06/23 5.3 25/09/19 5.1 11/06/15
    002 B 8.2 25/09/19 8.1 13/06/23 8.2 25/09/19 N 11/06/15
    003 C 7.6 11/06/15 7.1 13/06/23 7.4 25/09/19 7.6 11/06/15


    The number of columns after the Item and Position can vary, depending on how many readings we have but, if there isn't a reading one year, the survey date is still entered and an 'N' (for No Reading) is entered.

    What I need to get (in the BASETHK and BASEDATE cells) is the rightmost thickness reading for one, and the respective date for the other. I've made the BASE results and the cells they come from bold for clarity.

    Is this possible? I've Google lots, and tried LOOKUP, INDEX/MATCH and so on, but without real success.

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

    Re: Get rightmost non-date or text value in a row

    Welcome to the forum.

    The issue is that dates are just numbers, so will any of the other numbers be equal to or higher than the minumum serial number date in your dataset?

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-14-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    Re: Get rightmost non-date or text value in a row

    Thank you for your reply. I understand the dates are just numbers. None of the results will be greater than them. Nothing more than 50, I'd say.

    I'll do a mockup of the sheet.

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

    Re: Get rightmost non-date or text value in a row

    Thanks - and good (not everybody realiese this). I'll wait for the workbook, but column headers will probably come into play.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,759

    Re: Get rightmost non-date or text value in a row

    Maybe this:

    =LOOKUP(2,1/($E$1:$J$1="THICKNESS"),E2:J2)

    and this:

    =LOOKUP(2,1/($E$1:$J$1="THICKNESS"),F2:K2)

  6. #6
    Registered User
    Join Date
    06-14-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    Re: Get rightmost non-date or text value in a row

    Thank you for your help. Unfortunately, that's only showing the rightmost results for each.
    Shaun Allan

    Bestseling horror author

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

    Re: Get rightmost non-date or text value in a row

    If you want to exclude not numberic thickness, for example thickness = N,

    Please try in C2 and copy down:
    Formula: copy to clipboard
    =XLOOKUP(1,(E$1:J$1="THICKNESS")*(ISNUMBER(E2:J2)),E2:J2,"",0,-1)
    and try in D2 and copy down:
    Formula: copy to clipboard
    =XLOOKUP(1,(F$1:J$1="DATE")*(ISNUMBER(E2:I2)),F2:J2,"",0,-1)
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-14-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    Re: Get rightmost non-date or text value in a row

    Brilliant. That works perfectly. Thank you.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,759

    Re: Get rightmost non-date or text value in a row

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

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

    Re: Get rightmost non-date or text value in a row

    Glad to have helped .

  11. #11
    Registered User
    Join Date
    06-14-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    Re: Get rightmost non-date or text value in a row

    You've saved SO much work. It's appreciated.

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

    Re: Get rightmost non-date or text value in a row

    Thanks for your feedback.

    Please considder adding reputation to any helpers you think they deserve.
    In that case please click * Add Reputationleft below their answers.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,759

    Re: Get rightmost non-date or text value in a row

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new here, I shall do it for you this time: https://www.mrexcel.com/board/thread...a-row.1239227/)

  14. #14
    Registered User
    Join Date
    06-14-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    Re: Get rightmost non-date or text value in a row

    My apologies. I'll ensure this is done in future. The help given was immensely helpful in tight time constraints.

+ 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. Return Rightmost Value in Range
    By excelant123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2022, 12:00 PM
  2. Capturing last two rightmost digits of a date or number
    By vaughannet in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 12-29-2015, 03:01 PM
  3. [SOLVED] vlookup rightmost 4 characters only
    By jksedge in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-24-2013, 08:38 AM
  4. Locating the rightmost value in a row
    By cloudwalking in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-06-2013, 10:00 AM
  5. look for the rightmost cell with data
    By JakeAy in forum Excel General
    Replies: 2
    Last Post: 04-01-2010, 05:31 AM
  6. Return rightmost value in row
    By jbrandau in forum Excel General
    Replies: 4
    Last Post: 11-20-2009, 12:04 PM
  7. [SOLVED] Rightmost Column
    By BillCPA in forum Excel General
    Replies: 1
    Last Post: 05-11-2005, 04:06 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