• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

MACRO - VlookUP shipments status against on hold order

A11 Mighty

Member
Hello - Looking for some assistance creating a command button that will enable to check order numbers within "Pre Shipment" sheet against Order number within "Orders" sheet, if order number is found, this indicate the order was shipped and the status within column F "Order Status" will need to be changed to "SHIPPED"

Note: Once the status is changed to ( SHIPPED) I already have a Macro that will transfer that line into SHIPPED sheet.

Any help will be much appreciated!

Thanks,

A11 Mighty
 

Attachments

  • ORDER STATUS Chandoo.xlsm
    78.1 KB · Views: 6
Try:
Code:
Sub blah()
On Error GoTo exitNicely
Application.ScreenUpdating = False
With Sheets("PRV SHIPEMENT")
  lr = Application.Max(.Cells(.Rows.Count, "C").End(xlUp).Row, 3)
  ShippedOrderNos = .Range("C3:C" & lr).Value
End With
Set rngColmToCheck = Range("Table1").ListObject.ListColumns("Column8").DataBodyRange
For i = rngColmToCheck.Cells.Count To 1 Step -1
  Set cll = rngColmToCheck.Cells(i)
  If Not IsError(Application.Match(cll.Value, ShippedOrderNos, 0)) Then
    cll.Offset(, -3).Value = "SHIPPED"
  End If
Next i
exitNicely:
Application.ScreenUpdating = True
End Sub
 
Back
Top