+ Reply to Thread
Results 1 to 3 of 3

Set Variable in Cell.Find / Loop

  1. #1
    Registered User
    Join Date
    08-09-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    28

    Question Set Variable in Cell.Find / Loop

    Hello guys,

    I am just starting to write code in VBA and would need some help on this one! I have looked in similar threads / forums without any luck

    What I want to do is basic:

    Set a variable H2 + Selection.End(xldown)
    Loop through the cells of that variable range
    For each cell Use Cells.Find (to find same value in another ws)
    If cell found in other ws then
    'blabla
    If not
    'Next cell


    I can manage the loop, but need some guidance for the variable range in Cells.Find
    I have seen some solutions where you can use find depending on 1 cell value, but nothing with "selection.end xl down" / loop

    I would be very grateful of any help!

    Thanks
    Aucho
    Last edited by aucho; 05-22-2014 at 07:24 AM.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Set Variable in Cell.Find / Loop

    Something like this, maybe?
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    08-09-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Set Variable in Cell.Find / Loop

    Wow, Massive thank you Tinbendr, re-arranged it according to my file and it works perfectly!

    Aucho

+ 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. Obtaining a Variable for a loop in the cell above
    By exdaver in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2013, 01:03 PM
  2. [SOLVED] How to use a variable cell reference in a loop?
    By mullock in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2013, 03:24 PM
  3. Replies: 6
    Last Post: 12-21-2012, 08:03 AM
  4. [SOLVED] macro loop through variable range to find blank, add formula
    By sammar12 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-31-2012, 11:39 AM
  5. Replies: 1
    Last Post: 07-14-2011, 01:57 PM

Tags for this Thread

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