hello awesome people
i have an excel worksheet named Transit time who has integers as it counts days.
i want to have a pop up window in excel with a message like " you still have 7 days" or anything else if the transit time is less than 7 days per example , but i also want it to do two things :
- Color the cells who are less than 7 days
- Show the cells number in the message box
for now i have been able to set a small macro with "you still have 7 days" - changing the color (red per example )should be straightforward but i have something wrong in my writing ( BX is the column in excel)
please tell me what is wrong if possible .. and how to add the cells number ?!
i have an excel worksheet named Transit time who has integers as it counts days.
i want to have a pop up window in excel with a message like " you still have 7 days" or anything else if the transit time is less than 7 days per example , but i also want it to do two things :
- Color the cells who are less than 7 days
- Show the cells number in the message box
for now i have been able to set a small macro with "you still have 7 days" - changing the color (red per example )should be straightforward but i have something wrong in my writing ( BX is the column in excel)
please tell me what is wrong if possible .. and how to add the cells number ?!
Code:
Private Sub Workbook_Open()
If BX <= 7 Then
MsgBox "Adjustment is Below the Total"
End If
For Each cell In BX
If cell.Value <= 7 Then
cell.Interior.ColorIndex = 3
cell.Font.ColorIndex = 2
cell.Font.Bold = True
End If
Next
End Sub