Results 1 to 3 of 3

Vba multiple condition

Threaded View

  1. #1
    Registered User
    Join Date
    08-11-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    28

    Vba multiple condition

    Hi,

    I have created a VBA with the condition whereby if the nos are greater than/equal than 31 and less than/equal to 46, the value will return 1 in column L.

    But now, I want to add another condition whereby this will only be apply if column D is AA. Can anyone assist me on how to add that condition below?


    Sub macros()
    
    Dim lRow As Long
    
    Sheets("COMVERSE").Select
    
    lRow = Range("I" & Rows.Count).End(xlUp).Row
    
    For i = 2 To lRow
    
        
         If Cells(i, 9) >= 31 And Cells(i, 9) <= 46 Then
            Cells(i, 12) = "1"
        Else
            Cells(i, 12) = "NO"
        End If
        
    
    Next i
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] IF with multiple condition and ABS
    By jani.pk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-27-2014, 02:05 PM
  2. [SOLVED] Multiple condition (IF)
    By lokpal.panwar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 06:27 AM
  3. Replies: 1
    Last Post: 12-25-2012, 05:32 PM
  4. Replies: 6
    Last Post: 05-06-2010, 10:06 PM
  5. Multiple condition, multiple range formating
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-11-2009, 09:10 AM

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