• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sorting a group of data having particular key word =(Error……)

VDS

Member
Dear All,
I have taken the error messages of VB from help menu and put into excel. There are about 500 rows, some contains (Error message 1) and some contains no error messages. I want to segregate those Error messages separate and sort chronologically in another column say Error 1, Error2, Error 3 and like that. Sample file attached.
In the attached excel file, Column A gives the row data. In column B, I have extracted data of error messages through formula where particular keyword for eg (Error 12) is appearing within curly brackets at the last portion of all the rows. In Column D I have interchanged this keyword to First Portion like “Error 49” by removing brackets and putting hyphen. But unable to do the sequence to complete line say, Error 1, <message>, Error 2<message> row wise.

What I require in Sheet 2, (row data should remain as it is in Column A, while the compiled Data of Error Messages to be extracted in Column B without any blank rows with Indexing. Since it is alphanumeric, INDEX+SMALL together is not working. In short, Sample of Column G should be repeated in Column B without any additional columns.
What will be options to get it done. Help requested.

VDS
 

Attachments

  • pdf2xl - Copy.xlsm
    62.7 KB · Views: 2
Hi !

For the first part to extract only "error" lines, differents ways like

Find VBA method (beginner level, see VBA inner help)

• with no blank line (must delete row #2), via AdvancedFilter VBA method
(almost beginner level)

• …


To extract error #, using Split, Val, IsNumeric, … VBA functions.

And finally a sort …
 
Back
Top