+ Reply to Thread
Results 1 to 7 of 7

identify and return values in a column

  1. #1
    Registered User
    Join Date
    01-18-2014
    Location
    bangalore, india
    MS-Off Ver
    Excel 2010
    Posts
    14

    identify and return values in a column

    I have some alpha-numeric digits in a column.

    how to check for a particular alphabet in between the digits and return a specific value in other column.

    attached herewith sample file for reference.
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: identify and return values in a column

    Try this one

    =IF(MID(B6,6,3)="000","all-in",IF(RIGHT(B6)="a","alpha","beta"))
    Last edited by AlKey; 03-17-2014 at 01:00 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: identify and return values in a column

    In C6 Cell

    =IF((LEN(B6)-LEN(SUBSTITUTE(B6,"-","")))>1,IF(VALUE(LEFT(MID(B6,FIND("-",B6)+1,255),FIND("-",MID(B6,FIND("-",B6)+1,255))-1))=0,"all-in",IF(RIGHT(TRIM(B6),1)="a","alpha",IF(RIGHT(TRIM(B6),1)="0","beta",""))),"")

    Drag it down..


    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

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: identify and return values in a column

    Hi Vijay

    See the formula in the attached that does what I think you want.

    It looks like AlKey and I got the same answer. I don't know what Sixthsense is doing above...??
    Attached Files Attached Files
    Last edited by MarvinP; 03-17-2014 at 10:18 AM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

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

    Re: identify and return values in a column

    Hi MarvinP,

    Lol

    I was too complex because I thought what happens if the data is in variable in length with or without the separator "-"

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: identify and return values in a column

    Here is a little shorter method that will pick the number between the dashes. See if this formula makes sense to your sixthsense. The secret for this is in the trim function after blowing up all the dashes with spaces.

    =IF(TRIM(MID(SUBSTITUTE(B6,"-",REPT(" ",LEN(B6))),LEN(B6),LEN(B6)))="000","all-in",IF(MID(B6,LEN(B6),1)="a","alpha","beta"))

    AlKey's formula is shorter but would fail if there are more or less characters in the front part of the strings. This formula keys on the dashes and will work for different length starting characters.

    Look at sixthsense comments below if you don't have any dashes or the cell is blank...
    Last edited by MarvinP; 03-18-2014 at 12:42 AM.

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

    Re: identify and return values in a column

    Hi MarvinP,

    Nice and some bugs while testing the provided formula

    When the input value is like xyz then it's resulting Beta

    When there is no values in cell then it's resulting #VALUE! error.

+ 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. Replies: 2
    Last Post: 02-28-2014, 06:42 PM
  2. Macro to identify column by header and replace number values with string values
    By kang6789 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 05:44 PM
  3. Replies: 4
    Last Post: 03-04-2013, 01:41 AM
  4. Replies: 5
    Last Post: 05-09-2012, 02:30 PM
  5. Identify Matches and return values
    By charlierivers in forum Excel General
    Replies: 2
    Last Post: 11-10-2009, 05:07 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