Hi, I'm not sure how to progressively add values that meet a certain condition into a message box, but I think it's possible.
I'd like to see a result that shows something like:
Msgbox ("These weren't added:" & vbCrLf &
ActiveCell.Offset(a, 15).Value & vbCrLf &' when a = 3
ActiveCell.Offset(a, 15).Value & vbCrLf &' when a = 10
ActiveCell.Offset(a, 15).Value & vbCrLf &' when a = 11
ActiveCell.Offset(a, 15).Value)' when a = 21
for all values of "a" when it meets my condition.
Thanks in advance for any help.
Code:
a = integer
a = 1
For a = 1 To 21
If ActiveCell.Offset(a, 15).Value = ActiveCell.Offset(1, 11).Value Then
MsgBox ("This " & ActiveCell.Offset(a, 11).Value & " wasn't added to the list.)
End If
Next a
MsgBox (All values not added)
I'd like to see a result that shows something like:
Msgbox ("These weren't added:" & vbCrLf &
ActiveCell.Offset(a, 15).Value & vbCrLf &' when a = 3
ActiveCell.Offset(a, 15).Value & vbCrLf &' when a = 10
ActiveCell.Offset(a, 15).Value & vbCrLf &' when a = 11
ActiveCell.Offset(a, 15).Value)' when a = 21
for all values of "a" when it meets my condition.
Thanks in advance for any help.