+ Reply to Thread
Results 1 to 2 of 2

help extracting comma separated data

  1. #1
    Registered User
    Join Date
    04-07-2008
    Posts
    30

    Unhappy help extracting comma separated data

    Hi all,
    Please help! I'm trying to extract the return % after the last comma (some has 2 commas). Been trying for a while without much luck.

    For example:
    A1
    Company, Inc., 11.12% --> want 11.12%
    Company, 11.12% --> want 11.12%
    Altria Group, Inc., 6.71% --> want 6.71%
    Washington Mutual, Inc., 3.13% --> want 3.13%
    Chevron Corporation, Inc., 2.8% ---> want 2.8%
    Devon Energy Corporation, 2.5% ---> want 2.5%

    I've tried with this formula
    =IF(LEN(A1)-SEARCH(", ",A1)-1=4,TEXT(RIGHT(A1,4),"0.00%"),
    IF(LEN(A1)-SEARCH(", ",A1)-1=5,TEXT(RIGHT(A1,5),"0.00%"),
    IF(LEN(A1)-SEARCH(", ",A1)-1>=6,TEXT(RIGHT(A1,6),"0.00%"),)))

    and this:
    =IF(OR((LEN(A1)-SEARCH(", ",A1)-1>=6),(LEN(A1)-SEARCH(", ",A1)-1=4)),TEXT(RIGHT(A1,6),"0.00%"),TEXT(RIGHT(A1,5),"0.00%"))

    Both don't quite work!

    Any help would be greatly appreciated!

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    04-07-2008
    Posts
    30

    Smile Found the solution

    After digging around the forum, I found the solution to this problem by user

    sweep
    http://www.excelforum.com/showthread...=extract+comma

+ 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