MESSAGE ALERT

S

Shyla

I am having difficulty creating a macro that would display
a message 'value does not' if a value in cell A2 on
worksheet1 does not match with the value in cell A2 on
worksheet2. Please someone help me, thanks.
 
S

steve

Shyla,

If Sheets("Sheet1").Range("A2") <> Sheets("Sheet2").Range("A2") Then
Msgbox "Value does not match"
End If

Change Sheet1 and Sheet2 to the sheet names.

Or
If Activecell <> Sheets("Sheet2").Range(Activecell.Address) Then
Msgbox "Value does not match"
End If
 
E

EAB

If Worksheets("[name of worksheet1]".Range("A1").Value <>
Worksheets("[name of worksheet2]").Range("A2").Value Then
Msgbox "Value does not match"
Else: End If
 

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