POPUP REMINDER IN EXCEL

mrinal354

New Member
Joined
May 5, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I have certain entries related to no. of months in column C. In column E, i want to write my name but at the time of writing, i want a reminder if value of corresponding cell in Column C is greater than 4 . Pls guide me ho to do it.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Welcome to the Board!

Do the following:
- Right-click on the sheet tab name at the bottom of the screen, select "View Code", and paste this code in the VB Editor window that pops up:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

'   Exit if multiple cells updated at once
    If Target.CountLarge > 1 Then Exit Sub
    
'   Only run when a cell in column E is updated
    If Target.Column = 5 Then
'       Check to see if value in corresponding column C is greater than 4
        If Target.Offset(0, -2).Value > 4 Then
            MsgBox "Value in column C of this row is greater than 4!", vbOKOnly, "WARNING!"
        End If
    End If
            
End Sub
Now, anytime you make a manual entry in column E, if the value in column C of that same row is greater than 4, it will pop-up a warning message.
 
Upvote 0
Thank you so much !!and what if i have to check in both column C AND D to see that both have less than 4 and 9 rrespectively and receive a warning for either or both the cases?
 
Upvote 0
Thank you so much !!and what if i have to check in both column C AND D to see that both have less than 4 and 9 rrespectively and receive a warning for either or both the cases?
Just add another IF/THEN clause, like the first:
Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)

'   Exit if multiple cells updated at once
    If Target.CountLarge > 1 Then Exit Sub
    
'   Only run when a cell in column E is updated
    If Target.Column = 5 Then
'       Check to see if value in corresponding column C is greater than 4
        If Target.Offset(0, -2).Value > 4 Then
            MsgBox "Value in column C of this row is greater than 4!", vbOKOnly, "WARNING!"
        End If
        If Target.Offset(0, -1).Value > 9 Then
            MsgBox "Value in column D of this row is greater than 9!", vbOKOnly, "WARNING!"
        End If
    End If
            
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,212
Messages
6,123,655
Members
449,113
Latest member
Hochanz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top