Tag Archives: VBA Msgbox

VBAString Tip 5: Excel VBA Loop To Find Records Matching Search Criteria

This post will show you how to compare cells and display message box if condition is true.

I will show you how to:
-how to assign values to your variables _
-how to loop through rows _
-how to evaluate cell value with if statement

In the following image, the cells in columns A and B are being looped and the 2 cell values and being compared. When the condition is met, a message box will appear telling the row the condition is met on.


Watch how I do it:

Let me know if you have any questions

I consent to having this website store my submitted information so they can respond to my inquiry. See our privacy policy to learn more how we use data.