Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t4322
- ----------------------------------
- Sub Check_Expired_Items_Using_Loops()
- Dim b As Boolean, s As String, r As Long
- With ThisWorkbook.Worksheets(1)
- s = "لديك أصناف منتهية الصلاحية" & vbNewLine & "----------------------------------"
- For r = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
- If .Cells(r, 5).Value = 10 Then
- b = True
- .Cells(r, 6).Value = "expired"
- s = s & vbNewLine & .Cells(r, 4) & vbTab & vbTab & .Cells(r, 2)
- End If
- Next r
- If b Then MsgBox s: UserForm1.Show
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement