+ Reply to Thread
Results 1 to 19 of 19

Vba to search matching texts partly or fully in a purticular column

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Vba to search matching texts partly or fully in a purticular column

    I have texts to search in column c

    I am using data filtei by texts that contain and or method that is a tool of excel..

    But can i have vba to automate this process which can give me rows of similar text matching party or fully in column c

    But i have data in sheet 1 and i want to use vba in sheet 2.so that i can have result in seprate sheet.
    Last edited by ROHAN999; 10-02-2018 at 01:31 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    To help to prepare macros, please attach a short EXCEL file giving an idea about your data value and layout
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Vba to search matching texts partly or fully in a purticular column

    sir

    i am attaching sample sheet with results ,kindly assist me.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Vba to search matching texts partly or fully in a purticular column

    I can help but the code works for the same sheet.

    You can filter data of sheet 1 on sheet 1 itself.

    Would that help you?

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    What is the difference with the use of filter ?
    For example :
    Prepare filter for colums A to C
    in header column C make selection "to "

  6. #6
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736
    Quote Originally Posted by anilpatni1234 View Post
    I can help but the code works for the same sheet.

    You can filter data of sheet 1 on sheet 1 itself.

    Would that help you?

    No sir as the result is required in different sheet

    Still you plz provide that code

    I may try something else with it

  7. #7
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736
    Quote Originally Posted by PCI View Post
    What is the difference with the use of filter ?
    For example :
    Prepare filter for colums A to C
    in header column C make selection "to "
    Sir i am using filter only with contain text search but the data remains big, after filtei i use to copy it paste it via note pad to avoid copying of mid rows then there i use them further

    If i get such data directly in other sheet my job will become bit smoother

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    To avoid to prepare macro which is doing the job of the filter , I would suggest that you prepare man ually the filter and then clic on a button or something else to launch a macro to record filtered data into a new sheet.
    What do you thing ?

  9. #9
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Vba to search matching texts partly or fully in a purticular column

    Please Login or Register  to view this content.
    KINDLY ASSIST IN AMEDNDING THIS

  10. #10
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    See here what we can do
    In the file attached you can play with the macro
    What you have to do:
    Make the selection you want with the filter
    Do Control + a to launch the macro
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Vba to search matching texts partly or fully in a purticular column

    thanx alot sir

    its working fine

    but Criteria1:=Range("g1") give the exact sir

    can i have any option to check partly matching part

    for example i put as in g1


    then in column 3


    sentences having as will remain in filter

    i mean in place of exact match , the sentences which contains the phrase remains there in filter

  12. #12
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    It is only a matter how you prepare the filter selection in Excel
    see
    HTML Code: 

  13. #13
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Vba to search matching texts partly or fully in a purticular column

    sir

    i wanted to know how to change this
    Please Login or Register  to view this content.
    to get partly matching stings/text rather than exact match

  14. #14
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Vba to search matching texts partly or fully in a purticular column

    i want to match text which contains G1 text not exactly G1

    that is what my threat heading too sir-partly or fully

    kindly assist so that it may not even remain case sensitive if possible

  15. #15
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    It seems you want to prepare the filter using macro ...!
    See how the "Hom" selection is working with next code and file attached


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by PCI; 10-13-2018 at 02:29 AM.

  16. #16
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Vba to search matching texts partly or fully in a purticular column

    that is correct sir

    but how will i change search string every time

    that i why i was using G1 cell reference so that whatever will be written in cell G1 will be the search string

    rest the code works fine

  17. #17
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    See next code
    Please Login or Register  to view this content.

  18. #18
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Vba to search matching texts partly or fully in a purticular column

    this is working fine sir

    THANX ALOT
    Last edited by ROHAN999; 10-13-2018 at 07:05 AM.

  19. #19
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Vba to search matching texts partly or fully in a purticular column

    whatever i will write in cell g1 that will become search string
    Yes this what is doing the last macro sent.
    Up to you to choose what sort of search you want to do: Certainly the last one

+ 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] How to sum a range of cells based on partly matching text string
    By ruddochk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-22-2018, 04:02 PM
  2. To find out how much percentage of texts in two columns matching
    By catchnanan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2016, 09:46 PM
  3. Replies: 3
    Last Post: 06-29-2016, 01:38 PM
  4. Formula to search column of cell texts separately in a website
    By andrewb1988 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2015, 12:56 PM
  5. Matching of strings & texts
    By bapsie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-02-2013, 12:08 AM
  6. Forum search is fully functional now !!
    By Vaibhav in forum The Water Cooler
    Replies: 80
    Last Post: 02-09-2012, 07:23 AM
  7. sumif function when left 4 texts are matching
    By Vikram Dhemare in forum Excel General
    Replies: 1
    Last Post: 04-25-2006, 03:30 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