Results 1 to 5 of 5

Refer to cell using for each

Threaded View

  1. #1
    Registered User
    Join Date
    02-09-2007
    Posts
    29

    Refer to cell using for each

    Hi I have this code
    Dim Count As Integer
    For Each c1 In Worksheets("Sheet2").Range("A11:A24").Cells
        Count = 0
        For Each c2 In Worksheets("Sheet1").Range("C1:C200").Cells
            If (c1.Value = c2.Value) Then
                Count = Count + 1
            End If
        Next
        c1.Value = Count
    Next
    But what I want is a change in the last line

    c1.Value = Count
    to something like
    c1+NextRowOver.Value = Count
    Essentially, I want to use the cell in the next row over from c1. How can I do this?

    Thank you.
    Last edited by Lazhal; 02-23-2010 at 12:03 PM.

Thread Information

Users Browsing this Thread

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

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