+ Reply to Thread
Results 1 to 3 of 3

Print after finding matching string

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Print after finding matching string

    Hi, all excel vba gurus.

    I need some vba help here. I am trying to write a VBA to find 2 particular strings (there are multiple of them) in a log file and return its output 1 line below the matching lines in 2 separate columns (header of the column will the string name).

    The example is as following:

    Logfile
    XX_tname_VALUE
    0_strg_5.17450|3.59816|3.69636|2.52594|3.99766|8.33407|0.52536

    XX_tname_K_V
    0_strg_0|36|3|4|6|7|3

    Expected Output


    XX_tname_VALUE XX_tname_K_V
    0_strg_5.17450|3.59816|3.69636|2.52594|3.99766|8.33407|0.52536 0_strg_0|36|3|4|6|7|3


    There maybe more than 1 occurrence of the string "XX_tname_VALUE" & "XX_tname_K_V" in the log file as it can contains a lot of data. So the script should be able to handle it and output the multiple result of the searched string as shown in the above example.

    Appreciate for your kind help.

    Thank you.
    Attached Files Attached Files
    Last edited by seowfung75; 07-29-2014 at 02:18 AM. Reason: add in data

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Print after finding matching string

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    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

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Print after finding matching string

    Looking for new mathing string
    XX_tname_VALUE
    XX_tname_K_V

    example as attached
    Attached Files Attached Files

+ 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. Finding Matching Data in one Column/Adding corresponding matching string value.
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2013, 07:23 PM
  2. [SOLVED] problem finding string using .find method when string to be found contains ~ (a tilde)
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2013, 07:38 AM
  3. Replies: 2
    Last Post: 01-02-2013, 08:35 AM
  4. [SOLVED] Matching a small # string against a larger # string
    By Newbie1973 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 04-01-2012, 07:28 PM
  5. Searching a String for a Matching Word from another String
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 04:01 AM

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