+ Reply to Thread
Results 1 to 5 of 5

How do i stop if function returning a number which contains the same digit?

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    How do i stop if function returning a number which contains the same digit?

    Am using the formula:

    =IF(ISNUMBER(SEARCH("3",H5)),"COLLECT"," ")

    to return the text COLLECT in ,say, I5 if a 3 is input in H5. It seems that if a 13 or 23, or any number containing 3, is input in H5 then COLLECT also appears when I only want it to show COLLECT when 3 is used? Can anyone help please?
    Last edited by KWarlock; 02-13-2012 at 02:59 AM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: How do i stop if function returning a number which contains the same digit?

    Hi KW, welcome to the forum.

    Why can't you just use

    =IF(H5=3,"COLLECT","")

    ?

  3. #3
    Registered User
    Join Date
    02-13-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How do i stop if function returning a number which contains the same digit?

    Thank you Paul, as a novice I am maybe trying to overcomplicate it.

    But trying to have it so if 3,6,9 or 12 is input then they all show COLLECT? Can't seem to get the formula right with what you suggested?

    Thanks

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: How do i stop if function returning a number which contains the same digit?

    With multiple possible values, perhaps try:

    =IF(OR(H5={3,6,9,12}),"COLLECT,"")

  5. #5
    Registered User
    Join Date
    02-13-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How do i stop if function returning a number which contains the same digit?

    Thanks Paul! Seems to work great. Very much appreciated.

+ 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