+ Reply to Thread
Results 1 to 4 of 4

Thread: Seaching a text list using IF

  1. #1
    Registered User
    Join Date
    03-13-2010
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    49

    Seaching a text list using IF

    I have a list of codes in text form, I want a cell (L35) to return YES it sees a code in another referenced cell (L36) and stay blank if not. The code list is L93 to L100. I can use the IF statement and get it to work using only one cell in the list but not if I use the whole list. Can I use IF to do this or do I need another statement.


    This code works
    =IF(L36=L93,"YES","")
    I thought this may work but does not.
    =IF(L36=L93;L125,"YES","")
    Last edited by BobTheRocker; 11-24-2010 at 07:01 AM.

  2. #2
    Registered User
    Join Date
    03-13-2010
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Seaching a text list using IF

    This works but there must be a more efficient way of coding it?

    [code]
    This works but there must be a more efficient way of coding it?

    =IF(OR(L37=L93,L37=L94,L37=L96,L37=L97,L37=L98,L37=L99,L37=L100,L37=L101,L37=L102,L37=L103,L37=L104,L37=L105,L37=L106,L37=L107,L37=L108,L37=L109,L37=L110,L37=L111,L37=L112,L37=L113,L37=L114,L37=L115,L37=L116,L37=L117,L37=L118,L37=L119,L37=L120,L37=L121,L37=L122,L37=L123),"YES", "")
    Having done a bit of reading I've also noted the above statement is limited to 30 logicals. I have some lists that are over this limit so I really need a way of slimming this down. Say my list is from L93 to L125, that is over the limit. I'm sure there must be a way of querying if L36 equals L93 to L125 to return TRUE. Any help greatly appreciated.
    Last edited by BobTheRocker; 11-24-2010 at 06:47 AM.

  3. #3
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    3.0
    Posts
    2,472

    Re: Seaching a text list using IF

    Hi,

    Does this work for you?

    =IF(ISNUMBER(MATCH(L36,L93:L125,0)),"YES","")
    Please disregard anything in the above post. It may well have been edited without my consent, as has been the case with several posts and threads recently.

  4. #4
    Registered User
    Join Date
    03-13-2010
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Seaching a text list using IF

    Brilliant, it works a trat. Thank you, I will have to carry out some reading on those functions now. Was trying to add an extra column and use VLOOKUP but that is much simpler. Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0