+ Reply to Thread
Results 1 to 6 of 6

Check if a cell contains multiple values and return multiple specific values

  1. #1
    Registered User
    Join Date
    08-02-2013
    Location
    Hobart
    MS-Off Ver
    Excel 2003
    Posts
    3

    Check if a cell contains multiple values and return multiple specific values

    Hi, I'm not great with formulas and hoping someone can help me. I am trying to create a formula that will check if the adjacent cell contains a number of values (b0, b1,b2, b3, b4, b4, bneg1, bneg2, bneg3, bneg4, or bneg5) and return the corresponding value (0, 1, 2, 3, 4, 5, -1, -2, -3, -4, -5) when the adjacent cell looks like this:

    050613,16:57:18,af5632,habituation,b0,bluecircle12s_habit,1578,00011000,00000100,7000,0,0

    or

    050613,16:57:18,ag5939,extinctionearly,bneg5,redcircle19s,996,00000100,redcircle,17000,0,0


    What I need to happen is if the cell contains "b0" the formula writes "0", if the cell contains "bneg5" the formula writes "-5" etc.

    I have tried =IF(ISNUMBER(SEARCH("b0",R25)),"0") but I can't work out how to get the formula to search for multiple values and return a different value depending on what it finds in the adjacent cell.

    Any help would be greatly appreciated.

    Hollie

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Check if a cell contains multiple values and return multiple specific values

    Please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    08-02-2013
    Location
    Hobart
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Check if a cell contains multiple values and return multiple specific values

    Hi, I've uploaded an example with a before and after sheet.

    Thanks very much for you help!
    Attached Files Attached Files

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Check if a cell contains multiple values and return multiple specific values

    See the attached file
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-02-2013
    Location
    Hobart
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Check if a cell contains multiple values and return multiple specific values

    Thank you so much!!! You've saved me so much time!

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Check if a cell contains multiple values and return multiple specific values

    Quote Originally Posted by hollieb View Post
    Thank you so much!!! You've saved me so much time!
    You're Welcome!

+ 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] How to return multiple values to a single cell based on multiple criteria
    By lwallace in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 06:32 AM
  2. Select multiple criteria based on check box selection and return all unique values.
    By TommyToe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-21-2013, 09:14 AM
  3. Return Multiple Values with multiple rows & multiple columns
    By sachin parab in forum Excel General
    Replies: 2
    Last Post: 11-05-2012, 10:21 AM
  4. Finding multiple values to return multiple values
    By blacksheep in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-14-2012, 09:08 AM
  5. Store cell values in an array and return values on specific condition
    By gmalpani in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 11-27-2011, 06:43 AM

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