Results 1 to 6 of 6

Value compared to a range of values

Threaded View

  1. #1
    Registered User
    Join Date
    04-04-2011
    Location
    Riga
    MS-Off Ver
    Excel 2007
    Posts
    11

    Value compared to a range of values

    Hello,
    I am trying to compare a value to a range of values. I have many to compare to so AND is not an option, writing is too long, unless it is possible to put in an AND many values. And I can't use for loop to do something like Range("H"& integer).Value This is my shortened code that does not work because of the way I write Range syntax there:

    Dim x As Integer
    
        For x = 35 To 44
        If x <> Range("H1:H100").Value Then
             Cells(x * 12 - 10, 6).FormulaR1C1 = "Country ID"
             Cells(x * 12 - 10, 7).FormulaR1C1 = x
        End If
        
        Next x
    Last edited by skazis; 04-06-2011 at 01:10 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