Hi,
heres the link to the spreadsheet OB1.xlsm
Below is the code i put together and it works just that I dont know what to add to make it work exactly as I want
Issue 1:for the shure code in column AD there are only 2 words SHUR and SHUR20 the code puts the results I want for both when i just want it for the keyword SHUR not SHUR20, what do i need to add to the code to make it do that?
Issue 2: The rule for FUJI PHOTO FILM U.S.A.,INC. (located in column D) if column N has keywords “LENSES-Mirrorless Lenses” or “LENSES-Mirrorless Lenses” and column W is open box and column O is over $500 put in column H used, the code looks right to me at least but it doesnt excute the code, what am I doing wrong?
Issue 3: D & H DISTRIBUTING CO, the code works but when it comes to Microsoft, I only need it to apply the results only when the keywords in column N says "COMPUTER-Notebooks"
heres the link to the spreadsheet OB1.xlsm
Below is the code i put together and it works just that I dont know what to add to make it work exactly as I want
Issue 1:for the shure code in column AD there are only 2 words SHUR and SHUR20 the code puts the results I want for both when i just want it for the keyword SHUR not SHUR20, what do i need to add to the code to make it do that?
Issue 2: The rule for FUJI PHOTO FILM U.S.A.,INC. (located in column D) if column N has keywords “LENSES-Mirrorless Lenses” or “LENSES-Mirrorless Lenses” and column W is open box and column O is over $500 put in column H used, the code looks right to me at least but it doesnt excute the code, what am I doing wrong?
Issue 3: D & H DISTRIBUTING CO, the code works but when it comes to Microsoft, I only need it to apply the results only when the keywords in column N says "COMPUTER-Notebooks"
Code:
Sub Openbox()
Dim cel As Range, Rng As Range, Vendor As String
Worksheets("Not on a Category").Activate
Range("D2").Select
Set Rng = Range(Selection, Selection.End(xlDown))
For Each cel In Rng
Vendor = cel.Text
Select Case Vendor
Case "TIFFEN MANUFACTURING CORP."
If InStr(1, cel.Offset(, 2), "steadicam", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "lowel", 1) <> 0 Then
If cel.Offset(, 19) = "Open Box" Then cel.Offset(, 4) = "used"
End If
Case "SHURE INCORPORATED"
If InStr(1, cel.Offset(, 19), "Open Box", 1) <> 0 And _
InStr(1, cel.Offset(, 26), "SHUR", 1) <> 0 Then
cel.Offset(, 4) = "used"
End If
Case "TECH DATA CORP."
If InStr(1, cel.Offset(, 2), "viewsonic", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "dell", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "LG", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "HP", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "Apple", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "sony", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "asus", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "Beats by Dr. Dre", 1) <> 0 Then
If cel.Offset(, 19) = "Open Box" Then cel.Offset(, 4) = "used"
End If
Case "D & H DISTRIBUTING CO."
If InStr(1, cel.Offset(, 2), "asus", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "dell", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "Lenovo", 1) <> 0 Or _
InStr(1, cel.Offset(, 2), "Microsoft", 1) <> 0 Then
If cel.Offset(, 19) = "Open Box" Then cel.Offset(, 4) = "used"
End If
Case "FUJIFILM"
If InStr(1, cel.Offset(, 10), "Mirrorless Lenses", 1) <> 0 Or _
InStr(1, cel.Offset(, 10), "Mirrorless Cameras", 1) <> 0 Then
If cel.Offset(, 11) > 500 And cel.Offset(, 19) = "Open box" Then
cel.Offset(, 2) = "used"
End If
End If
'etcetera
End Select
cel.Offset(, 4).Interior.Color = vbGreen 'So you can see what already is done
Next cel
End Sub