I am trying to get the result from different cells based on the given if expression. I get the result in several message boxes, and the result for all cells is calculated based on checking the first statement. How can I get all the results in one msgbox and allow the function to check every single cell in a range?
Dim rcell As Range For Each rcell In Vou_Summary.Range("I5:I16") If 0 < rcell <= 2.5 Then MsgBox rcell.Cells.Offset(0, -3).Value & " Is Critical", vbOKOnly, "Notice!" ElseIf 2.5 < rcell <= 4 Then MsgBox rcell.Cells.Offset(0, -3).Value & " Requires PR Placement", vbOKOnly, "Notice!" ElseIf rcell >= 7 Then MsgBox rcell.Cells.Offset(0, -3).Value & " Is Oversupplied", vbOKOnly, "Notice!" Else End If Next
source share