+ Reply to Thread
Results 1 to 4 of 4

Extract Value of Cell by Character

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Extract Value of Cell by Character

    I have a workbook that combines two values into one cell and separates them by a slash ( / ). I need a macro to grab the data before or after the "/". I run into a problem when the value is more that one digit.

    See attached workbook sample.
    Attached Files Attached Files
    Last edited by Ricker090; 09-12-2011 at 01:05 PM. Reason: Solved

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Extract Value of Cell by Character

    Hello Ricker090,

    Use can do this very easily using the Split method. his will split a delimited string into a a 1-D array. Each element can then be returned directly. Here is your code with this change added.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Extract Value of Cell by Character

    Ricker090,

    There are a few ways you can do this...

    Please Login or Register  to view this content.
    Or you can use formulas:
    Please Login or Register  to view this content.
    Sorry Leith, same idea just some other options
    Last edited by Chance2; 09-12-2011 at 12:32 PM. Reason: Duplicate posting

  4. #4
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Extract Value of Cell by Character

    Thanks! I enjoy having options to chose from.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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