+ Reply to Thread
Results 1 to 4 of 4

Check a cell to see if it contains something then put in custom content somewhere else

  1. #1
    Registered User
    Join Date
    05-07-2018
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    38

    Check a cell to see if it contains something then put in custom content somewhere else

    Hello!

    I need excel to check a cell to see if it contains the phrase "SHG." If it does I want it to return 99.995% to a different cell. If it doesn't contain SHG I just want it to return "Remainder." This is important because there is SHG Zinc Balls, SHG Zinc Slabs, SHG Zinc Anodes. If it isn't SHG then the Remainder is higher than 99.995%. I was thinking it would look something like this:

    =IF(ISNUMBER(SEARCH("SHG",A1041))=TRUE,"99.995%","Remainder")

    I did get that to return "Remainder," but when I typed in SHG it still returned as "Remainder." I am thinking my problem is obviously with my search function. I think it is intended to work and return an entire cell and not specific text. Is this my issue? Can it work the way I want it to?

    Just kidding... I figured it out. =IF(ISNUMBER(SEARCH("SHG",A1041)),"99.995%","Remainder") It did work I just had the wrong cell in there that it was checking.
    Last edited by imperialzinc; 05-11-2018 at 12:32 PM.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Check a cell to see if it contains something then put in custom content somewhere else

    Your formula should return 99.995% (as a text value since it's in quotes) if SHG is found anywhere in the cell A1041.

    If SHG is not found anywhere in A1041, your formula should return Remainder.

    Check that your calculations are set to automatic.
    When you type in anything with SHG in it into cell A1041 and press Enter, the cell with the formula in it should show 99.995%.

  3. #3
    Registered User
    Join Date
    05-07-2018
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    38

    Re: Check a cell to see if it contains something then put in custom content somewhere else

    Yes all I wanted it to do was return 99.995%. Text is fine because we just print it out. I actually needed it on A1040 and not A1041. Oops

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Check a cell to see if it contains something then put in custom content somewhere else

    Simple mistake. Glad you found it.

    Thanks for the rep!
    Last edited by 63falcondude; 05-11-2018 at 01:24 PM. Reason: Rep Added

+ 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. [SOLVED] Dynamic check of cell content
    By Sparhawk111 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2016, 11:31 AM
  2. Check cell content from one row to second row and put unique values in 3rd row
    By salwanmeenakshi1502 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-12-2015, 03:05 AM
  3. [SOLVED] Using check box to display cell content but it only displays #value!
    By i.r.smith in forum Excel General
    Replies: 5
    Last Post: 09-08-2014, 08:00 AM
  4. [SOLVED] VB Code to check the content in cell
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2014, 11:06 AM
  5. How to get button to check cell content
    By FoxIII in forum Excel General
    Replies: 1
    Last Post: 02-17-2009, 08:25 AM
  6. Cell content in custom header: How?
    By Brian __ Lowe in forum Excel General
    Replies: 3
    Last Post: 11-30-2005, 08:25 AM
  7. How to check a cell for content before running macro.
    By Incoherent in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2005, 12:05 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