+ Reply to Thread
Results 1 to 3 of 3

VBA Macro To Find All Matches In Column Range

  1. #1
    Registered User
    Join Date
    03-19-2013
    Location
    Toronto,Canada
    MS-Off Ver
    Excel 2010
    Posts
    60

    VBA Macro To Find All Matches In Column Range

    Hi every body,
    I have a sheet called "date" which has names of customers in column "H". Putting into consideration that there is an input box in which I enter the name to be found.
    I'm looking for (1)A macro to find all occurrences of a name in column "H" and (2)Another Macro to find the last occurrence of a name.
    I tried this Macro, however it shows the first occurrence only.
    any other suggestions on best practices of the code are appreciated

    HTML Code: 

  2. #2
    Registered User
    Join Date
    03-19-2013
    Location
    Toronto,Canada
    MS-Off Ver
    Excel 2010
    Posts
    60

    Re: VBA Macro To Find All Matches In Column Range

    Sorry, the sheet is called "Appointment"

  3. #3
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: VBA Macro To Find All Matches In Column Range

    what do you want to do with the names found?
    you can write script to make a list on a sheet somewhere or an array of strings/address or a single delimited string.


    To find the last one specifically just change SearchDirection:=xlNext to SearchDirection:=xlPrevious
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

+ 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] Find First cell that matches range
    By wellsw in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-12-2013, 12:24 PM
  2. Formula to find all matches in column A and return cells from column C
    By GenericPat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-19-2012, 04:56 PM
  3. [SOLVED] Macro required to find matches and return value in the next column.
    By excelvba123 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-09-2012, 03:33 AM
  4. [SOLVED] find matches in a column
    By Mark Scott in forum Excel General
    Replies: 4
    Last Post: 07-25-2006, 07:50 PM
  5. [SOLVED] Find the POSITION IN A RANGE of text in a string that matches value(s) in a range
    By Cornell1992 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2006, 03:25 PM

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