+ Reply to Thread
Results 1 to 25 of 25

Extract required information from a column using VBA

  1. #1
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Arrow Extract required information from a column using VBA

    Hello dear members,

    I have attached the excel sheet where i have shown the data i have available (See Column A) and the results i am expecting to extract from the data i.e column C;D;A.
    from the column A, i want to extract the module name (highlighted in orange) and the information in the module as we scroll down (highlighted in blue) and put that information in column C,D,A as i have shown in the expected results. I have to do the same when send module start (you will find it when you scroll down)

    here i have written only two modules data as an example, i have more modules and i want to apply the same method in all of them. How to achieve this using VBA? plz help!!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question

    Hi !

    Why your 'two modules data' are a single module duplicate ?‼

  3. #3
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Hi you are right! it should not be duplicate i just copied the first module data in expected result to just give an example. Nevertheless it should be accordingly the second module data.
    for e.g
    F188 L8B2-14C036-AF
    F18C 3,618E+11
    F124 M9R3-14C098-AA1
    F125 RequestOutOfRange
    F112 RequestOutOfRange
    F113 Ascii - L8B2-14D374-AA3
    DD01 Distance - 4605 km
    D020 RequestOutOfRange
    "

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    Not really clear about the logic.
    If this is not how you wanted, you need to explain the logic clearly.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Thankyou Jindon. your code is printing expected results but in other sheet not in the same sheet. I want it to represnt result on the right may be in column c,d and e.

    Also i am getting type mismatch error if i extend the module data in column A. please help to correct this . Thankyou
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    1) change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    2) change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Thank you so much Jindon that's working perfectly fine. I need little bit more favor now, if i have the same kind of data in the column B (see attached as an example) and i want to extract the same results next to the column of the first extracted column results than how can i modify this code?

    The reason i want this because i want to have both column results and i want to compare the similarity between both results. Thanks again for giving me the code

    *i have copied the column A data to B to just give as an example. generally it wont be same
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    Then change to
    Please Login or Register  to view this content.
    Edit: one line added
    Last edited by jindon; 09-05-2019 at 06:25 AM.

  9. #9
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    you're a Champ bro. Now code is giving the results i wanted.

    Now i want to go littel bit further. can you tell me how do i put filter options in a extracted results column (C,D,E,F,G,H see attched file) for different modules name for eg. MODULE (Info) : Name - RCM and also filter options for code names like for example F190,F188,DD00 etc. so that when i choose RCM Module it only shows the data on right belong to this module similarly when i choose F190 it will show only F190 row for all with modules name on the left and the Ascii code on the right.

    At the end it should compare the results of both extracted data i.e according to module name and according to code i.e F190,F188 etc

    Expected results i have shown in the attached image file and sheet1. I have tried to show the expected result when i filter F190 and then it compares on the right Ascii code and tells the result if both matches

    Thank you for being there to help
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Imran/CVT; 09-05-2019 at 09:33 AM.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    Data in Col.A & Col.B are exactly the same, so you don't need to compare.

    If they are not the same, you can not line them up by the filter, you need another vba to line up.

  11. #11
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Thank you for the comment. Yes the data will be different in both A and B column. here as an example i used the same data to exract the information as exactly your code is doing. so if i want to line them up how can i achieve this by another Vba?

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    Change to
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Thank you again for the Code!. Sorry if i did not clear you the expected result i want. i have uploaded two examples when i have different data.

    First: The code is not line up correctly

    Second: What i want exactly is, it compares both results i.e F188 of first to the F188 of the second and if both are same highlight it with green color and tell "match" similarly if do not match for example F190 in the image then highlight yellow and tell mismatch.

    Third: I want to have an opportunity that i can look only particular codes for example here if i select F190 then it shows only F190 of all the modules as shown in example2 pic. Similarly i have the opportunity to look only particular module from the result data
    Attached Images Attached Images

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    Past midnite here, so I'll look at it tomorrow.

  15. #15
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Thankyou. You are a blessing

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    Picture doesn't help,so I need to see your workbook with the filtered.

    Again, if the data structure, I mean the order of appearance of the Module name and 4 character code are not the same in col.A & B, it can be filtered like that.

    So, I need to see the workbook that you are testing.

  17. #17
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Hi Jindon!

    Here in attached file you can see order of structure is not same for 4 character code and also it is also possible that modules from one column may be less than the other hence i want to compare and filter the results according to 4 character code and module names as mentioned in the previous message. Thank you for your response
    Attached Files Attached Files

  18. #18
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    So how you want it?

    I need to see your desired result.

  19. #19
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    I've just realized that it should match up Col.C Name & col.F Name, not all..

    try this
    Please Login or Register  to view this content.
    Last edited by jindon; 09-07-2019 at 09:56 AM.

  20. #20
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    First, i want it to compare both results i.e. see column DE and GH as example according to module name and 4 charater code. red color means both results arer different and green means are same. i want to compare it in a simmalr way with highlighted color.

    second, i want to have opportunity to filter results according to module names and 4 character code (e.g.F190,F188...) in column C and D
    Attached Files Attached Files

  21. #21
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    See my previous post.

    You will need to change 2 "Sheet1" to the actual sheet name.
    Last edited by jindon; 09-07-2019 at 10:08 AM.

  22. #22
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    Yes you have lined up the results according to module names and 4 character code thats fine. better will be if it highlights the difference in column E and H values with color i mean if not same highlight with red if same highlight with green.

    Inaddition, i see all the modules and 4 charachter code in column C and D better will i can filter particular name and code

    In addition to all , Thank you for the code

  23. #23
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    Use conditional formatting for yourself.

    Rest, I don't understand what you are talking about.

  24. #24
    Registered User
    Join Date
    07-12-2019
    Location
    Germany
    MS-Off Ver
    Office365
    Posts
    61

    Re: Extract required information from a column using VBA

    I said, i want to compare cells of column E and H to see if values are same or different by highlighting colors. And, want to use Autofilter option using vba on column C and D.

    Anyways Thank you for the code

  25. #25
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract required information from a column using VBA

    So I said Conditional Formatting to apply and it is easy.

    You can filter C using wildcard like * ABC, with col.D.

    Problem?

+ 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] Need to extract tons of information and place them into column
    By jykoh92 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2016, 05:18 AM
  2. [SOLVED] Extract Information from a column to make a separate table
    By kaleonard08 in forum Excel General
    Replies: 5
    Last Post: 03-21-2016, 02:41 PM
  3. Replies: 1
    Last Post: 10-05-2015, 03:03 PM
  4. Extract information using criteria from only one column
    By Krasen in forum Access Tables & Databases
    Replies: 1
    Last Post: 01-05-2013, 06:12 PM
  5. Extract Row and Column Information for Non-Zero Table Entries
    By dellschipper in forum Excel General
    Replies: 1
    Last Post: 01-31-2012, 06:02 PM
  6. Replies: 4
    Last Post: 07-24-2008, 10:38 AM
  7. [SOLVED] Required Information
    By Mike J in forum Excel General
    Replies: 1
    Last Post: 05-22-2006, 01:10 AM

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