Results 1 to 3 of 3

Pass from a for cicle to a search cicle

Threaded View

  1. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Pass from a for cicle to a search cicle

    Try:
    Sub foo()
    Dim rng1 As Range, rng2 As Range, c As Range
    
    Set rng1 = Sheet1.Range("A1:A322000")
    Set rng2 = Sheet1.Range("J1:J234100")
    
    Application.ScreenUpdating = False
    
    For Each c In rng1
        If Not c.Value = "" Then
            If Not rng2.Find(c.Value, lookat:=xlWhole) Is Nothing Then c.Offset(0, 2).Value = "X"
        End If
    Next c
    
    Application.ScreenUpdating = True
    
    End Sub
    Last edited by Olly; 07-21-2014 at 04:49 AM.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Why cant i pass an integer to the filter search criteria???????????
    By JamesGoulding85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2014, 06:34 AM
  2. [SOLVED] Search for decimal and when found pass row number to rest of string
    By beenbee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2014, 07:14 AM
  3. Sum cell (cicle) with range boundaries
    By jmaocubo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-01-2013, 02:35 PM
  4. Replies: 3
    Last Post: 06-07-2012, 07:25 PM
  5. [SOLVED] Analyze Within An Array and Pass Back Once vs. Pass at each applicable Instance
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2012, 05: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