Results 1 to 4 of 4

Macro "if" loop, change value cell if condition in other cell is met

Threaded View

  1. #1
    Registered User
    Join Date
    09-20-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    18

    Smile Macro "if" loop, change value cell if condition in other cell is met

    Hi everyone,

    I have the following macro (piece of it); which works very well:

    
     'We loop from Lastrow to Firstrow (bottom to top)
            For Lrow = Lastrow To Firstrow Step -1
                'We check the values in the A column in this example
                With .Cells(Lrow, "Q")
                
                    If Not IsError(.Value) Then
                     
                       If IsNumeric(.Value) = True Then
    If .Value >= 100 Then
    .Value = (.Value + 7) * 1.3
    End If
    End If
         'Checks if value in row Q is 100 or more and applies formula
            
                    End If
                End With
            Next Lrow
    Now I would like to change it in a way that it does the following:

    If the value in column A is "NAME1", then the value in column B will multiply by 1.5

    Haven't a clue where to begin, can anyone help me please?

    Thanks in advance,
    DMR
    Last edited by DMR1712; 03-16-2010 at 06:50 AM. Reason: Poor title, sorry about that!

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