Actually I need to write a program in Macros that insert a value if the conditions matches..
say for example,
K(column name) = "BU Accessories" And AG(column name) = "APPAREL" And AM = "CCS" And AO = "Inline" And BL = "new" Then CE = "18 months"
that is IF all the above mentioned conditions matches with corresponding rows, then column CE should be automatically assigned to 18 months.
I tried with this program but i didnt get any value assigned to particular column..
Sub model()
Dim K As String
Dim AG As String
Dim AM As String
Dim AO As String
Dim BL As String
Dim CE As Integer
If K = "BU Accessories" Then
If AG = "Apparel" Then
If AM = "CCS" Then
If AO = "Inline" Then
If BL = "new" Then
CE = 18
Else
CE = 0
End If
End If
End If
End If
End If
End Sub
say for example,
K(column name) = "BU Accessories" And AG(column name) = "APPAREL" And AM = "CCS" And AO = "Inline" And BL = "new" Then CE = "18 months"
that is IF all the above mentioned conditions matches with corresponding rows, then column CE should be automatically assigned to 18 months.
I tried with this program but i didnt get any value assigned to particular column..
Sub model()
Dim K As String
Dim AG As String
Dim AM As String
Dim AO As String
Dim BL As String
Dim CE As Integer
If K = "BU Accessories" Then
If AG = "Apparel" Then
If AM = "CCS" Then
If AO = "Inline" Then
If BL = "new" Then
CE = 18
Else
CE = 0
End If
End If
End If
End If
End If
End Sub