Way to create a note based on the contents entered in a cell?

N

Nicci

I know you can conditionally format a cell to show a different color when a
certain number is entered but is there a way to have a congratulatory note
pop up upon entry. I want to have a comment box, a note, a textbox, or
anything similar pop up on the screen if someone enters a number greater than
150 in a certain cell. Other than having something show up in a separate
cell on the worksheet, is there any way to do this that I haven't thought of?
I'm not good with Macros... thanks
 
J

Jim Thomlinson

You could use data validation.
Choose decimal less than 150.
In the error alert switch to Information from Stop add in a title and a
message.

If less than 150 nothing happens. If 150 or greater then the information box
shows up with your message.
 
G

Gord Dibben

With the limitaions you impose...............

Check out Data Validation for input and error messages and preventing the
entry of a number greater than 150.

If you don't want to prevent, but just show a pop-up message, you must use
VBA

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Target.Address = "$A$2" And Target.Value > 150 Then
MsgBox "Congratulations"
End If
stoppit:
Application.EnableEvents = True
End Sub

Right-click on the Sheet Tab and "View Code". Copy/paste the above into
that module.

Edit the Target.Address and msgbox contents.

Alt + q to return to Excel.


Gord Dibben MS Excel MVP
 
J

Jim Thomlinson

Perhaps I misunderstand but if you use an Information Error Alert then all
you get is the pop up with no real restriction or prevention on the value
entered. What does the VBA get you that is significantly different? The only
thing I see is that I get the ! mark with no option to change it using
validation.
 
G

Gord Dibben

Jim

I interpret that OP doesn't want a restriction so DV wouldn't do much good.

Quoted from original posting................
is there a way to have a congratulatory note
pop up upon entry.

Keywords being "congratulatory note"

The code allows the value to be entered and a message displayed.


Gord
 

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