+ Reply to Thread
Results 1 to 5 of 5

Macro to Reformat Raw Data - Correct Syntax?

  1. #1
    Registered User
    Join Date
    02-07-2021
    Location
    Seattle, WA
    MS-Off Ver
    Office 2019
    Posts
    2

    Macro to Reformat Raw Data - Correct Syntax?

    Hi,

    I'm building a macro to automate the formatting of raw data. For now, I just want to get the correct syntax for the formula I'm building.

    The problem I've run into is creating a formula (for a new column) that scans a string of text for a phrase then looks through a table in a separate worksheet with the scanned for phrase on the left and the value I want the cell to return if it matches in the right.

    Layout:

    Description Worksheet

    [Description Column] - cells with strings of text

    [Type] - ???this is where the result of the formula will go???

    Input Worksheet

    [Contains Column] - scan for this phrase in the [Description Column]

    [Return Column] - If there's a match, return this word in the [Type]

    The formula should check all the phrases in the [Contains Column] for a possible match.

    Help would be immensely appreciated!

    File is attached below.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by FDibbins; 02-08-2021 at 02:28 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Macro to Reformat Raw Data - Correct Syntax?

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you ar new, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Macro to Reformat Raw Data - Correct Syntax?

    There are instructions at the top of the page explaining how to attach your sample workbook.

  4. #4
    Registered User
    Join Date
    02-07-2021
    Location
    Seattle, WA
    MS-Off Ver
    Office 2019
    Posts
    2

    Re: Macro to Reformat Raw Data - Correct Syntax?

    Done, thanks.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Macro to Reformat Raw Data - Correct Syntax?

    I made the title change in post 1 for you - that way it carries through for the rest of the thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [SOLVED] Help with making a formula
    By stockman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-07-2018, 09:28 AM
  2. Decision-Making Formula
    By andrewc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-20-2013, 07:21 AM
  3. Making a Robust IF then formula
    By wallstreetballa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-25-2013, 02:33 AM
  4. Making if-then formula to consider day of the week
    By McBane in forum Excel General
    Replies: 9
    Last Post: 03-02-2011, 01:09 PM
  5. Making a hyperlink from a formula
    By protocoledu in forum Excel General
    Replies: 6
    Last Post: 12-17-2009, 09:07 AM
  6. Making a certain formula
    By DogStar5988 in forum Excel General
    Replies: 5
    Last Post: 08-01-2007, 05:33 AM
  7. Making a formula using letters
    By Parkside1 in forum Excel General
    Replies: 1
    Last Post: 06-09-2006, 04:20 PM

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