I have an Excel file that tracks engine status from Sales and Production departments. Columns A - M in the workbook contain data necessary to deem the engine status. Columns N - AR are used to track engine status with the following column order: Sales, Production, Day 1, Status. That repeats till Day 8 (i.e. Sales, Production, Day 8, Status).
Column AV is called "MB51 Shipped" and column AY is "Title Transfer".
I have 2 requests for the Macro such that:
1) If "Shipped" in column AV, then the empty remaining Days will have "Rollup" in both Sales and Production columns.
I got helped by someone on this and he recommended to add the following codes to "Master Worksheet":
Dim lastColumn As Long
Dim counter As Long
Application.EnableEvents = False
' Check if header is "MB51 Shipped"
If Me.Cells(1, Target.Column).Value = "MB51 Shipped" Then
' Get last column based on first row
lastColumn = Me.Cells(1, Me.Columns.Count).End(xlToLeft).Column
' Check all cells in row and find matches for Sales and Production
For counter = 1 To lastColumn
' Check if header match and cell is not empty
If (Me.Cells(1, counter).Value = "Sales" or Me.Cells(1, counter).Value = "Production") And Me.Cells(Target.Row, counter).Value = vbNullString Then
Me.Cells(Target.Row, counter).Value = "RollUp"
End If
Next counter
End If
Application.EnableEvents = True
It seemed to work as first but then I noticed the Day cells didn't return anything even though originally my macro DID return correctly the values based on IF statements. Can you please advise how I can fix this?
2) If the last entered Sales cell says "Title Transfer" then return "x" in column AY (51st column)
Any help is greatly appreciated! Thank you!!!!
Bookmarks