+ Reply to Thread
Results 1 to 7 of 7

Linking multiple IF funtions.

  1. #1
    Registered User
    Join Date
    07-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Linking multiple IF funtions.

    I have a list of stocks in one column and I am trying to categorize them.

    Cells:
    AAPL, INTC, QCOM
    AAPL, QCOM
    CHKP

    These are 3 separate cells in the same column. I have a database of few hundred rows in this column to categorize.
    I want to categorize each cell as either QCOM or CHKP depending on which ticker is included in the cell.
    So far i'v beening writing a function of:
    =if(search("QCOM",A2,1)>=1,"QCOM",IF(search("CHKP",A2,1)>=1,"CHKP","notfound"))

    the issue is that when it is a QCOM cell, it works fine but when it is a CHKP cell, the first search function results in a #value error and thereby ending the function so it never gets to the second part (the false value of the first IF statement which activates the second IF statement)

    any commentary and advice would be much appreciated.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Linking multiple IF funtions.

    Try it like this:

    =if(ISNUMBER(search("QCOM",A2,1)),"QCOM",IF(ISNUMBER(search("CHKP",A2,1)),"CHKP","notfound"))

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Linking multiple IF funtions.

    hey pete. I really appreciate the help but when you apply isnumber in this manner it only replies a "false" value which is interpreted as >=1 so even when i perform this on a CHKP cell, it simply fills it out as QCOM. Essentially, the first IF statement is regarded as value and always returns the true value under this construct.

  4. #4
    Registered User
    Join Date
    07-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Linking multiple IF funtions.

    Ok i figured it out. i changed the logical test to =true instead of >=1 thereby using the constrained values of the isnumber function. thanks so much for the help, I really appreciate it.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Linking multiple IF funtions.

    Works for me, as can be seen in the attached.

    Pete
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Linking multiple IF funtions.

    yup I see it works. my mistake. Always glad to learn mutiple new ways.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Linking multiple IF funtions.

    You don't need to have =TRUE in there, as that is implied.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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