+ Reply to Thread
Results 1 to 4 of 4

find all instances for specific value in first column

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    find all instances for specific value in first column

    Hello everyone
    I have a code that is supposed to find all the instances of specific string 'Total' in my example
    I need to select not only found cells but to select two cells before it too ...
    For example :
    When applying the code : the following cells are selected (A5 - A12 - A18 - A25)
    I need to select also two cells before each cell ..that's to select also A4 and A3 ...A11 and A10 .. A17 and A16 ... A24 and A23

    So the required result is to select all the following cells (store them in Rng Variable) :::A3 - A4 - A5 - A10 - A11 - A12 - A16 - A17 - A18 - A23 - A24 -A25
    Hope it is clear
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,486

    Re: find all instances for specific value in first column

    Try:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: find all instances for specific value in first column

    Thanks a lot Mr. TMS
    It is working like charm

    I tried before your post to do the same but with this line
    Please Login or Register  to view this content.
    But of course I got an error

    Thank you very much for great and quick help

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,486

    Re: find all instances for specific value in first column

    You're welcome. Thanks for the rep.

+ 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 the first and last instances of a text value in a column
    By Tamarissa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-15-2015, 12:13 PM
  2. Find all instances from Sheet1 Column B in Sheet2 Column B, Update Sheet2 Column A
    By djsmith97 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2015, 08:57 AM
  3. Replies: 4
    Last Post: 10-27-2014, 04:07 PM
  4. VBA Find all instances of a specific string and copying the number of count in cell
    By dilshandil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2013, 10:27 PM
  5. Replies: 1
    Last Post: 02-12-2013, 06:02 PM
  6. Replies: 1
    Last Post: 02-05-2013, 09:14 AM
  7. Find all instances of formulas refering to a specific cell?
    By ThomasCarter in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-16-2013, 11:47 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