ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Way to create a note based on the contents entered in a cell? (https://www.excelbanter.com/excel-discussion-misc-queries/260922-way-create-note-based-contents-entered-cell.html)

Nicci

Way to create a note based on the contents entered in a cell?
 
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

Jim Thomlinson

Way to create a note based on the contents entered in a cell?
 
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.
--
HTH...

Jim Thomlinson


"Nicci" wrote:

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


Gord Dibben

Way to create a note based on the contents entered in a cell?
 
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

On Wed, 7 Apr 2010 11:50:13 -0700, Nicci
wrote:

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



Jim Thomlinson

Way to create a note based on the contents entered in a cell?
 
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.
--
HTH...

Jim Thomlinson


"Gord Dibben" wrote:

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

On Wed, 7 Apr 2010 11:50:13 -0700, Nicci
wrote:

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


.


Gord Dibben

Way to create a note based on the contents entered in a cell?
 
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

On Wed, 7 Apr 2010 15:13:01 -0700, Jim Thomlinson
wrote:

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.




All times are GMT +1. The time now is 05:54 PM.

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