ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MESSAGE ALERT (https://www.excelbanter.com/excel-programming/280832-message-alert.html)

Shyla

MESSAGE ALERT
 
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.

steve

MESSAGE ALERT
 
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

--
sb
"Shyla" wrote in message
...
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.




EAB

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


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com