Results 1 to 2 of 2

Extracting Data from a Cell with Standard Naming Convention

Threaded View

jdohlinger Extracting Data from a Cell... 10-05-2012, 08:45 PM
protonLeah Re: F(n) to Extract Data from... 10-05-2012, 09:42 PM
  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    9

    Extracting Data from a Cell with Standard Naming Convention

    Ok guys this is a tricky one...

    I have a set of data with a column of "names" that have certain substrings of information separated by underscores (_).

    e.g. sampledata1_moredata2_moredata_moredata3_moredata4_moredata5

    I would like to write a function that says "pull data after 2nd underscore third underscore and fourth underscore, leaving out everything else" or "pull data from after the 4th _ and after the 5th _" you get it....

    I wrote a similar code in SQL the other day that worked well if any of you guys use both programs I'll add it (below) for reference.

     select
                    substring ([creative name], charindex ('_', [creative name])+1, 
                    charindex ('_', [creative name], charindex ('_', [creative name])+1)-charindex ('_', [creative name])-1)
    as [creative name_2],
    For reasons not worth explaining I need to recreate this in excel... any thoughts?
    Last edited by jdohlinger; 10-06-2012 at 12:58 PM.

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