+ Reply to Thread
Results 1 to 8 of 8

Formula to look up multiple values and extract text from string - Facebook Advertising

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Formula to look up multiple values and extract text from string - Facebook Advertising

    Hi Excel Forum,


    Is there a formula that searches a column for multiple values to extract specified text? The (Mid, Right, Left) formulas only work when the character limit is equal for each string in the column.

    Here is an example:

    A1 - 2012 Campaign - CPC - Acquisition - Sponsored Story - W18+
    A2 - 2012 Campaign - oCPM - Acquisition - Standard Ad - W18+
    A3 - 2012 Campaign - CPM - Acquisition - Application Ad - A18+

    Now in columns B I want to extract "Sponsored Story" or "Application Ad" for all strings that include that word.

    IN column C I want to extract all ads that were "oCPM" "CPC" or "CPM"

    These attributes will allow us to pivot the data properly. This is a common issue for Facebook Advertisers right now as there are so many attributes that one can export within ads manager without having access to the ADS API. If you can answer this I am sure it would help many people stuck in the same situation I am in. Many thanks in advance.

    Regards,
    Excel Forum Newbie

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Formula to look up multiple values and extract text from string - Facebook Advertising

    How about using "Text to columns" using "-" as delimiter? Then each string between 2 "-"s will be placed in its own cell. Based on that you'll perhaps be able to perform your analyses...
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Registered User
    Join Date
    08-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula to look up multiple values and extract text from string - Facebook Advertising

    Hey Soren,

    Thanks for the quick response. Could you provide me with an example of what formula to use for the following string:

    2012 Campaign - CPC - Sponsored Story - A18+ - Mobile - Precise Interest - Cooking

    So there would need to be 7 fields per delimiter.

    Thanks!

  4. #4
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Formula to look up multiple values and extract text from string - Facebook Advertising

    It's not a formula. "Text to columns" is found under "Data" in the ribbon. Mark the area with your strings and then click it.

    Else I provided a formula solution to a similar problem here:
    http://www.excelforum.com/excel-form...59#post2911859
    You'll need to adapt to your specific case by inter alia replacing "." with " - " in the formula.

  5. #5
    Registered User
    Join Date
    08-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula to look up multiple values and extract text from string - Facebook Advertising

    Soren,

    Thank you so much this will save me a ton of time. Now, I am stuck on one more thing the "Destination Cells" where I want the string to be pasted into is not right after the original string i.e.in the example below I would want to paste the delimiter fields into the column beginning at D2 - Is this possible?

    A2: The - Sky - Is - Blue
    B2: Metric 1
    C2: Metric 2
    D2:


    Thanks again.



    Quote Originally Posted by Søren Larsen View Post
    It's not a formula. "Text to columns" is found under "Data" in the ribbon. Mark the area with your strings and then click it.

    Else I provided a formula solution to a similar problem here:
    http://www.excelforum.com/excel-form...59#post2911859
    You'll need to adapt to your specific case by inter alia replacing "." with " - " in the formula.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Formula to look up multiple values and extract text from string - Facebook Advertising

    are they always in that format if so i think you could get exatly waht you need with a formula
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  7. #7
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Formula to look up multiple values and extract text from string - Facebook Advertising

    try this in column D

    Please Login or Register  to view this content.
    here is book like you described.

    solution31082012.xlsx

  8. #8
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Formula to look up multiple values and extract text from string - Facebook Advertising

    Quote Originally Posted by bcommando17 View Post
    Soren,

    Thank you so much this will save me a ton of time. Now, I am stuck on one more thing the "Destination Cells" where I want the string to be pasted into is not right after the original string i.e.in the example below I would want to paste the delimiter fields into the column beginning at D2 - Is this possible?

    A2: The - Sky - Is - Blue
    B2: Metric 1
    C2: Metric 2
    D2:


    Thanks again.
    If you are using "Text to columns", then sadly no. This will always overwrite the columns next to the cell on which you are using "Text to columns"; you'll need a formula solution. Or you could place the string in D2 -> then use "Text to columns" -> and then delete the original column.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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