hi experts!
i Im starting to learn VBA/Macros and Im having trouble
Can some one help me with If statements.
In the workbook sheet 2 I have a macro for an If statement but I cant figure out how to auto fill in the d3-d12 using the macro.
here is my marco that i want to auto fill in cells D2:D12
Sub If_()
If Range("C2") >= 300000 Then
Range("D2") = 0.3 * Range("C2")
ElseIf Range("C2") <= 300000 Then
Range("D2") = 0.15 * Range("C2")
End If
End Sub
Ive tried this one and doesnt work
Sub If_()
If Range("C2:C12") >= 300000 Then
Range("D2:D12") = 0.3 * Range("C2:C12")
ElseIf Range("C2") <= 300000 Then
Range("D2:D12") = 0.15 * Range("C2:C12")
End If
End Sub
how can we solve dis problem?
i Im starting to learn VBA/Macros and Im having trouble
Can some one help me with If statements.
In the workbook sheet 2 I have a macro for an If statement but I cant figure out how to auto fill in the d3-d12 using the macro.
here is my marco that i want to auto fill in cells D2:D12
Sub If_()
If Range("C2") >= 300000 Then
Range("D2") = 0.3 * Range("C2")
ElseIf Range("C2") <= 300000 Then
Range("D2") = 0.15 * Range("C2")
End If
End Sub
Ive tried this one and doesnt work
Sub If_()
If Range("C2:C12") >= 300000 Then
Range("D2:D12") = 0.3 * Range("C2:C12")
ElseIf Range("C2") <= 300000 Then
Range("D2:D12") = 0.15 * Range("C2:C12")
End If
End Sub
how can we solve dis problem?