Cell contents check and prompt out message (By using Macro)

T

tlee

Hi all,

Could you know how to use Macro to check the cell contents with specified
"String" and prompt out Message box?

E.g. If the Column B1 = "USA" and Column H1 ="Mexico" , prompt the message
box "USA and Mexico are found".

Thanks,
Tlee
 
B

Barb Reinhardt

I'm thinking you want something like this

Msgbox(Range("B1") & " and " & range("H1") & " are found.")

This assumes that these ranges are on your active sheet.
 
T

tlee

Barb,

Thanks for your help and information.

I would like to use control flow to check the cell "B1" and "H1" such as if
statement. After checked, promot message or continous run the code.

Thanks
Tlee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top