+ Reply to Thread
Results 1 to 2 of 2

If input value begins with a certain string, place into specific column?

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Santa Ana, CA USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    If input value begins with a certain string, place into specific column?

    Hello, all. Looking for a pointers on a macro to take an input value, and depending on what it begins with, place it in the next available cell in that column.

    Quick explaination of whats involved:
    I am using input devices to collect measurement data into a spreadsheet as the measurement is being taken. I have set up the hardware to insert an identifying string at the beginning of each data packet (let's say Tool1 and Tool2) so through wedge software the value input into the spreadsheet would read "Tool1,.0064" or Tool1,1.3752" (no quotes) if the measurement was sent from Tool1, or "Tool2,1.7983" or "Tool2,.0675" if it was sent from Tool2. In each case the "Tool1," and "Tool2," are merely labels followed by a comma separator, and are what I'd like to use to determine which column the number value goes (let's say Tool1 goes in column D and Tool2 goes into column E) and put in in the next empty cell in that column. The number value is the actual measured dimension and the only part of the data packet that needs to be shown in the spreadsheet/cell (so if possible, also stripping out the "Tool1," or "Tool2" label, only leaving the number value).

    I suppose having a single input cell (maybe A1) be active while the macro is running may be a good idea (?) with the ability to stop the macro for sheet error/editing purposes (?).


    Some pointers would be great. The layout of the sheet is pretty much open for now. Thank you for the help, folks!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,703

    Re: If input value begins with a certain string, place into specific column?

    Look at the attached. Would this work for you?
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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