+ Reply to Thread
Results 1 to 6 of 6

return value between two $'s

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    return value between two $'s

    Hello. How can I return the value between two $'s. For example, $X$12. I just want to return X, $AB$12 I want to return AB.

  2. #2
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: return value between two $'s

    If your data is restricted to your examples then you can use this:

    =IF(LEN(L35)>5,MID(L35,2,2),MID(L35,2,1))
    If I've helped U pls click on d *Add Reputation

  3. #3
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: return value between two $'s

    You can use this for variations in your data:

    =LEFT(MID(A2,2,100),(FIND("$",MID(A2,2,100),1)-1))

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: return value between two $'s

    If your samples were meant to include =, then try this version, copied down...
    =MID(A1,FIND("$",A1,1)+1,FIND("@",SUBSTITUTE(A1,"$","@",2),1)-2)

    If your samples where meant to have = in front, that wont work, and Im not sure a regular formula will extract that for you either. Excel looks aty the results of a cell, not the actual contents (formulas etc)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    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: return value between two $'s

    in B1 and copy down

    =TRIM(MID(SUBSTITUTE(A1,"$",REPT(" ",5)),5,5))

    Row\Col
    A
    B
    1
    $AB$12 AB
    2
    $X$12 X
    3
    $XFD$125 XFD
    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

  6. #6
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: return value between two $'s

    Thanks. Good examples.

+ 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. Double click row to return data to userform for edit then return back to sheet
    By MattRSJ in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-31-2014, 06:05 AM
  2. [SOLVED] Return value if within range, return multiple values if ranges overlap
    By cde1983 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-17-2013, 06:16 AM
  3. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  4. Replies: 6
    Last Post: 10-11-2012, 02:39 PM
  5. Search...Return...give info based on the return address
    By deek1004 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2012, 03:36 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