+ Reply to Thread
Results 1 to 3 of 3

Find each occurrence in a column and do for each occurrence

  1. #1
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Holland, MI
    MS-Off Ver
    Excel 2007
    Posts
    110

    Find each occurrence in a column and do for each occurrence

    I serious love this forum. Thanks to all for all the help. I think this one is simple, and I already have one method to do it, I'm just wondering if there is a more efficient way to do it. I have a column of numbers and I want to search for a specific value in that column that may happen multiple times. Each time I find that value, I want to do something. If I don't find it, I will do nothing.

    I've already written code with a for/next loop that looks at each value and compares it to the value I'm looking for. So, something like this...

    Please Login or Register  to view this content.
    I guess I just want to know if there is a better way to do that. Thanks for any and all suggestions.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Find each occurrence in a column and do for each occurrence

    The Find method is more efficient, although frankly I doubt you'd notice the difference unless you've got lots of data. You can find an example in the VBA Help.

  3. #3
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Holland, MI
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Find each occurrence in a column and do for each occurrence

    Thanks for the reply. Are you talking about this type of routine?

    Please Login or Register  to view this content.
    If so, this one works with the first instance of the value being found. How do I make it work for multiple instances of the value being found?

    Thanks.

+ 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. find the nth occurrence from the bottom of a column
    By hopefulhart in forum Excel General
    Replies: 8
    Last Post: 10-18-2014, 06:48 PM
  2. Replies: 3
    Last Post: 09-15-2014, 07:56 PM
  3. [SOLVED] Find the first occurrence of any Date in a column
    By maw230 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-14-2014, 02:43 PM
  4. [SOLVED] Find last occurrence of text in a column and return value in next column
    By LindaLu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2014, 09:45 AM
  5. VB Code to find 1st Occurrence of text in column A
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-25-2013, 09:46 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