+ Reply to Thread
Results 1 to 9 of 9

Searching a cell with data separated with a comma to return a different value

  1. #1
    Registered User
    Join Date
    10-25-2010
    Location
    cardiff wales
    MS-Off Ver
    Excel 2007
    Posts
    29

    Searching a cell with data separated with a comma to return a different value

    hi Guys

    In Column A, I have an infinite list of data separated by a comma e.g. 89,90,91,93,121,126

    in column B, I want to search column A to see if there is matching record from a specific list situated between Y1 and Y12

    in column C, I also want to search column A to see if there is a match from another list situated between Z1 and Z10

    if there is a match from list Y1:Y12 I want the formula to return "milling"
    if there is a match from list Z1:Z10 I want the formula to return "turning"
    if there is no match from the two lists I want the formula to return "other"

    I hope I have explained it in a way you understand

    thanks in advance

    Simon

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,953

    Re: Searching a cell with data separated with a comma to return a different value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. 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 shown, mock them up manually if necessary.

    Remember to desensitize the data.

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

    View Pic
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    10-25-2010
    Location
    cardiff wales
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Searching a cell with data separated with a comma to return a different value

    Test Piece.xlsx

    I hope I have done this correct!!!

    thanks

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,953

    Re: Searching a cell with data separated with a comma to return a different value

    I don't quite understand but here's my attempt (column B):
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-25-2010
    Location
    cardiff wales
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Searching a cell with data separated with a comma to return a different value

    hi
    thank you
    the numbers in the two lists Y&Z correspond to a group of milling machines or a group of turning machines
    what I want to achieve is the list of data in column A are what I get out of a report so I want to tell whether the data refers to a milling operation a turning operation or if not return other
    if the two columns B&C are separate I can then determine whether an operation has both milling and turning

    thank you for helping me

    simon

  6. #6
    Registered User
    Join Date
    10-25-2010
    Location
    cardiff wales
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Searching a cell with data separated with a comma to return a different value

    hi all

    does this mean that this cant be done??

    Please let me know!!

    thanks

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,733

    Re: Searching a cell with data separated with a comma to return a different value

    Quote Originally Posted by orshims View Post
    hi all

    does this mean that this cant be done??

    Please let me know!!

    thanks
    Try this formula in B1 of your uploaded workbook and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Try this formula in C1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It produces this:
    Row\Col
    A
    B
    C
    D
    E
    F
    1
    89,90,91,98,121,126 turning other
    103
    93
    2
    89,90,91,109,109,121,126 turning other
    104
    94
    3
    89,90,91,109,109,121,126 turning other
    105
    95
    4
    89,90,91,109,109,121,126 turning other
    106
    123
    5
    89,90,91,109,109,121,126 turning other
    107
    125
    6
    89,90,91,109,109,121,126 turning other
    108
    97
    7
    89,90,91,103,103,103,121,126 other milling
    124
    98
    8
    89,90,91,103,103,103,121,126 other milling
    110
    99
    9
    89,90,91,107,107,107,121,126 other milling
    100
    10
    89,90,91,107,107,107,121,126 other milling
    101
    11
    89,90,91,103,103,121,126 other milling
    102
    12
    89,90,91,109,121,126 turning other
    109
    13
    89,90,91,93,121,126 turning other
    14
    89,90,91,103,98,114,119,121,126 turning milling
    15
    89,90,91,109,103,119,121,126 turning milling

    The file is attached.
    Attached Files Attached Files
    Last edited by FlameRetired; 01-16-2015 at 02:32 AM.

  8. #8
    Registered User
    Join Date
    10-25-2010
    Location
    cardiff wales
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Searching a cell with data separated with a comma to return a different value

    awesome exactly what I needed thanks again

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,733

    Re: Searching a cell with data separated with a comma to return a different value

    Your welcome. Glad it helped.

+ 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. Search cell for multiple text , return comma separated text in separate cell if found
    By dangerdoug in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2013, 01:52 PM
  2. graphs from comma separated data in one cell
    By kirkendall in forum Excel General
    Replies: 0
    Last Post: 09-12-2012, 08:31 AM
  3. columns to data that have separated by comma to seperate cell
    By naflas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2012, 12:13 AM
  4. [SOLVED] separate cell with comma separated data into one column
    By Tenos in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2012, 02:45 PM
  5. Replies: 8
    Last Post: 01-29-2010, 09:31 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