+ Reply to Thread
Results 1 to 13 of 13

If a Value exists in a string return a value in another cell.

  1. #1
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87

    If a Value exists in a string return a value in another cell.

    I am after a formula to determine if a value in one cell (column F) exists in a string in column B.

    If exists place W in column E or a L if not exists.

    I can then apply the formula to column C and D accordingly.

    Thanks for your help.
    Attached Files Attached Files

  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,859

    Re: If a Value exists in a string return a value in another cell.

    In E2:

    =MAP(F2:F16,B2:B16,LAMBDA(x,y,IF(ISERROR(MATCH(x,--TEXTSPLIT(y,,","),0)),"L","W")))
    Attached Files Attached Files
    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 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,859

    Re: If a Value exists in a string return a value in another cell.

    If you want to include C and D, try this:

    =MAP(F2:F16,B2:B16&C2:C16&D2:D16,LAMBDA(x,y,IF(ISERROR(MATCH(x,--TEXTSPLIT(y,,","),0)),"L","W")))
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: If a Value exists in a string return a value in another cell.

    Another way,

    E2
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: If a Value exists in a string return a value in another cell.

    Another way too,

    E2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  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,859

    Re: If a Value exists in a string return a value in another cell.

    Seen, but no reply ...

    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, remember that you can reward 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 each of those who offered help.

  7. #7
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87

    Re: If a Value exists in a string return a value in another cell.

    Thank you Ail,
    I am in awe of your skills. The formula works perfectly in the spreadsheet but generates a spill in the table format. I am just trying to find out why or remove the table formatting which means changing other formulae.
    Thank you so much. I will let you know what I am able to do.
    Last edited by Bob1955; 03-15-2024 at 03:11 PM.

  8. #8
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87

    Re: If a Value exists in a string return a value in another cell.

    This formula works perfectly in a sheet but generates a spill in table format. Is that expected, DJ?

  9. #9
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: If a Value exists in a string return a value in another cell.

    Spill array does not work with tables.

    Use this formula instead.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by DJunqueira; 03-15-2024 at 03:34 PM.

  10. #10
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87

    Re: If a Value exists in a string return a value in another cell.

    Thank you Ali. Your solution worked.
    Cheers

  11. #11
    Registered User
    Join Date
    12-27-2006
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    87

    Re: If a Value exists in a string return a value in another cell.

    Thank you for your reply and your time windknife.

  12. #12
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: If a Value exists in a string return a value in another cell.

    Tks for the feedback, glad to have helped.

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

    Re: If a Value exists in a string return a value in another cell.

    cell E2 formula , drag down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. Formula to find if string exists in different cell within same column
    By km_ski in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-03-2023, 11:01 AM
  2. Replies: 7
    Last Post: 08-22-2015, 03:51 PM
  3. Replies: 1
    Last Post: 08-22-2015, 12:36 PM
  4. Replies: 6
    Last Post: 06-05-2015, 09:28 AM
  5. Search a cell for a string that exists in a list of values
    By jefflach in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-23-2013, 11:23 AM
  6. formula to return value from string of text if certain criteria exists
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-29-2012, 02:19 AM
  7. Replies: 4
    Last Post: 12-29-2009, 08:18 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