+ Reply to Thread
Results 1 to 8 of 8

Extract values between <>

  1. #1
    Registered User
    Join Date
    06-20-2014
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    17

    Extract values between <>

    Hi all

    Need some help

    How can I extract values between <>

    Example:

    <15.000,00kn 40,00kn>

    I need to extract 15.000,00 and 40,00 to a variable1(15.000,00) and variable2(40,00)

    Thank you

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Extract values between <>

    Is the source of the string a cell? A value assigned to a variable in VBA?
    Is there always a space between the 2 values?
    Details, and a set of data more representative of different situations would really help here.
    Also, is the source string bigger or does it start with < and end with >
    Last edited by Arkadi; 04-10-2018 at 01:34 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Extract values between <>

    One way:

    =TRIM(MID(SUBSTITUTE("¦"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($A1,"<",""),">","")," ","¦"),"¦",REPT(" ",125)),125*COLUMNS($A:A),125))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Extract values between <>

    Copy formula across and down... though I have just seen that this was in the VBA sub-forum

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Extract values between <>

    A vba option:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-20-2014
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    17

    Re: Extract values between <>

    Quote Originally Posted by Arkadi View Post
    Is the source of the string a cell? A value assigned to a variable in VBA?
    Is there always a space between the 2 values?
    Details, and a set of data more representative of different situations would really help here.
    Also, is the source string bigger or does it start with < and end with >


    All is always the same except the values....

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Extract values between <>

    Does my code or Glenn's formula solve your issue then?

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Extract values between <>

    Just in case
    Please Login or Register  to view this content.

+ 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: 11
    Last Post: 10-27-2016, 07:33 PM
  2. Replies: 6
    Last Post: 08-09-2016, 10:50 AM
  3. [SOLVED] Match values from an Invoice list with bank extract values
    By fleyd in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-14-2016, 12:52 PM
  4. [SOLVED] Extract values (row values and column values) with formula
    By bjnockle in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-17-2014, 10:13 AM
  5. Macro Loop to Extract Specific Values and Min/Max Values From Column/Rows Range
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-19-2010, 09:19 AM
  6. Extract Unique Values, Then Extract Again to Remove Suffixes
    By Karl Burrows in forum Excel General
    Replies: 23
    Last Post: 06-25-2005, 08: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