PC Review


Reply
Thread Tools Rate Thread

Create a warning message

 
 
Stuart M
Guest
Posts: n/a
 
      29th Jun 2009

Cell validation only works when data is entered directly in a cell. I want to
recreate this effect so that Excel displays a pop up message when the
calculated value of a cell falls below £100. The cell in question is
calculating the sum of three other cells on the worksheet and is formatted as
currency.

Cheers
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      29th Jun 2009

Hi,

Because it is a calculated value you can use the worksheet calculate event

Private Sub Worksheet_Calculate()
If Range("A1").Value < 100 Then
MsgBox "Cell value " & Range("A1").Value
End If
End Sub

Mike

"Stuart M" wrote:

> Cell validation only works when data is entered directly in a cell. I want to
> recreate this effect so that Excel displays a pop up message when the
> calculated value of a cell falls below £100. The cell in question is
> calculating the sum of three other cells on the worksheet and is formatted as
> currency.
>
> Cheers

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      29th Jun 2009

Somthing like the below. Right click sheet tab>View Code and paste the below
code..A1:C1 is the range you enter the values...and D1 is the cell with
formula. Adjust to suit..

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False

If Not Application.Intersect(Target, Range("A1:C1")) Is Nothing Then
If Range("D1") < 100 Then
MsgBox "Total of A1:C1 should be more than 100"
Target.Value = 0: Target.Activate
End If
End If

Application.EnableEvents = True
End Sub
--
If this post helps click Yes
---------------
Jacob Skaria


"Stuart M" wrote:

> Cell validation only works when data is entered directly in a cell. I want to
> recreate this effect so that Excel displays a pop up message when the
> calculated value of a cell falls below £100. The cell in question is
> calculating the sum of three other cells on the worksheet and is formatted as
> currency.
>
> Cheers

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      29th Jun 2009

you might also consider using Conditional Formatting - ie let the cell turn
red or something to make it really visible

"Stuart M" <Stuart (E-Mail Removed)> wrote in message
news:2234ADA5-741C-41EB-9772-(E-Mail Removed)...
> Cell validation only works when data is entered directly in a cell. I want
> to
> recreate this effect so that Excel displays a pop up message when the
> calculated value of a cell falls below £100. The cell in question is
> calculating the sum of three other cells on the worksheet and is formatted
> as
> currency.
>
> Cheers


 
Reply With Quote
 
Stuart M
Guest
Posts: n/a
 
      29th Jun 2009

Hi Mike thanks for the answer. Its the value returned in the Sum cell that
must be used for validation - i.e. if it shows <£100 then show the warning
message.

The users input data somewhere else which is summed in a different cell so I
want the summed cell to display a warning if it is less than a given amount.

Any ideas?

"Mike H" wrote:

> Hi,
>
> Because it is a calculated value you can use the worksheet calculate event
>
> Private Sub Worksheet_Calculate()
> If Range("A1").Value < 100 Then
> MsgBox "Cell value " & Range("A1").Value
> End If
> End Sub
>
> Mike
>
> "Stuart M" wrote:
>
> > Cell validation only works when data is entered directly in a cell. I want to
> > recreate this effect so that Excel displays a pop up message when the
> > calculated value of a cell falls below £100. The cell in question is
> > calculating the sum of three other cells on the worksheet and is formatted as
> > currency.
> >
> > Cheers

 
Reply With Quote
 
Stuart M
Guest
Posts: n/a
 
      29th Jun 2009

Hi Jacob thanks for the answer. I couldn't get it to work at all. I just want
a warning displayed if the value is below a certain monetary figure. The
simple formula in that cell is =SUM(I46:J48)

so if that result is >100 show the warning message

Any ideas?

"Jacob Skaria" wrote:

> Somthing like the below. Right click sheet tab>View Code and paste the below
> code..A1:C1 is the range you enter the values...and D1 is the cell with
> formula. Adjust to suit..
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Application.EnableEvents = False
>
> If Not Application.Intersect(Target, Range("A1:C1")) Is Nothing Then
> If Range("D1") < 100 Then
> MsgBox "Total of A1:C1 should be more than 100"
> Target.Value = 0: Target.Activate
> End If
> End If
>
> Application.EnableEvents = True
> End Sub
> --
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Stuart M" wrote:
>
> > Cell validation only works when data is entered directly in a cell. I want to
> > recreate this effect so that Excel displays a pop up message when the
> > calculated value of a cell falls below £100. The cell in question is
> > calculating the sum of three other cells on the worksheet and is formatted as
> > currency.
> >
> > Cheers

 
Reply With Quote
 
Stuart M
Guest
Posts: n/a
 
      29th Jun 2009

Sorry I meant less than < DOH

"Stuart M" wrote:

> Hi Jacob thanks for the answer. I couldn't get it to work at all. I just want
> a warning displayed if the value is below a certain monetary figure. The
> simple formula in that cell is =SUM(I46:J48)
>
> so if that result is >100 show the warning message
>
> Any ideas?
>
> "Jacob Skaria" wrote:
>
> > Somthing like the below. Right click sheet tab>View Code and paste the below
> > code..A1:C1 is the range you enter the values...and D1 is the cell with
> > formula. Adjust to suit..
> >
> > Private Sub Worksheet_Change(ByVal Target As Range)
> > Application.EnableEvents = False
> >
> > If Not Application.Intersect(Target, Range("A1:C1")) Is Nothing Then
> > If Range("D1") < 100 Then
> > MsgBox "Total of A1:C1 should be more than 100"
> > Target.Value = 0: Target.Activate
> > End If
> > End If
> >
> > Application.EnableEvents = True
> > End Sub
> > --
> > If this post helps click Yes
> > ---------------
> > Jacob Skaria
> >
> >
> > "Stuart M" wrote:
> >
> > > Cell validation only works when data is entered directly in a cell. I want to
> > > recreate this effect so that Excel displays a pop up message when the
> > > calculated value of a cell falls below £100. The cell in question is
> > > calculating the sum of three other cells on the worksheet and is formatted as
> > > currency.
> > >
> > > Cheers

 
Reply With Quote
 
Stuart M
Guest
Posts: n/a
 
      29th Jun 2009

I'm being lazy I know but can you tell me how?

Thnaks. Probably the low-tec way might be best!

"Patrick Molloy" wrote:

> you might also consider using Conditional Formatting - ie let the cell turn
> red or something to make it really visible
>
> "Stuart M" <Stuart (E-Mail Removed)> wrote in message
> news:2234ADA5-741C-41EB-9772-(E-Mail Removed)...
> > Cell validation only works when data is entered directly in a cell. I want
> > to
> > recreate this effect so that Excel displays a pop up message when the
> > calculated value of a cell falls below £100. The cell in question is
> > calculating the sum of three other cells on the worksheet and is formatted
> > as
> > currency.
> >
> > Cheers

>

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      29th Jun 2009

Select the sum cell. From menu Format>Conditional Formatting.

Condition1
CEll value is>lessthan>100
Select a color from 'Format'

If this post helps click Yes
---------------
Jacob Skaria


"Stuart M" wrote:

> Sorry I meant less than < DOH
>
> "Stuart M" wrote:
>
> > Hi Jacob thanks for the answer. I couldn't get it to work at all. I just want
> > a warning displayed if the value is below a certain monetary figure. The
> > simple formula in that cell is =SUM(I46:J48)
> >
> > so if that result is >100 show the warning message
> >
> > Any ideas?
> >
> > "Jacob Skaria" wrote:
> >
> > > Somthing like the below. Right click sheet tab>View Code and paste the below
> > > code..A1:C1 is the range you enter the values...and D1 is the cell with
> > > formula. Adjust to suit..
> > >
> > > Private Sub Worksheet_Change(ByVal Target As Range)
> > > Application.EnableEvents = False
> > >
> > > If Not Application.Intersect(Target, Range("A1:C1")) Is Nothing Then
> > > If Range("D1") < 100 Then
> > > MsgBox "Total of A1:C1 should be more than 100"
> > > Target.Value = 0: Target.Activate
> > > End If
> > > End If
> > >
> > > Application.EnableEvents = True
> > > End Sub
> > > --
> > > If this post helps click Yes
> > > ---------------
> > > Jacob Skaria
> > >
> > >
> > > "Stuart M" wrote:
> > >
> > > > Cell validation only works when data is entered directly in a cell. I want to
> > > > recreate this effect so that Excel displays a pop up message when the
> > > > calculated value of a cell falls below £100. The cell in question is
> > > > calculating the sum of three other cells on the worksheet and is formatted as
> > > > currency.
> > > >
> > > > Cheers

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      29th Jun 2009

see Jacob's reply ... he gives the details

"Stuart M" <(E-Mail Removed)> wrote in message
news:2FB11423-DF8D-43BC-BE8D-(E-Mail Removed)...
> I'm being lazy I know but can you tell me how?
>
> Thnaks. Probably the low-tec way might be best!
>
> "Patrick Molloy" wrote:
>
>> you might also consider using Conditional Formatting - ie let the cell
>> turn
>> red or something to make it really visible
>>
>> "Stuart M" <Stuart (E-Mail Removed)> wrote in message
>> news:2234ADA5-741C-41EB-9772-(E-Mail Removed)...
>> > Cell validation only works when data is entered directly in a cell. I
>> > want
>> > to
>> > recreate this effect so that Excel displays a pop up message when the
>> > calculated value of a cell falls below £100. The cell in question is
>> > calculating the sum of three other cells on the worksheet and is
>> > formatted
>> > as
>> > currency.
>> >
>> > Cheers

>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a pop up warning box with cell information? Rikki727 Microsoft Excel Misc 1 23rd Jun 2009 10:37 AM
How do I create a warning message on a command button lkreeder Microsoft Excel New Users 4 1st Feb 2009 04:52 PM
how do I create warning box if hours are under or over Gunther Dawson Microsoft Access Database Table Design 1 21st Feb 2008 07:50 AM
How to create a warning msg box? jesZee Microsoft Access Queries 2 15th Aug 2006 08:52 PM
Warning message when creating a message in Outloo J. Alyn Microsoft Outlook Discussion 0 7th Jun 2004 05:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:37 AM.