Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Validating a Formula

I am trying to validate a cell that has a formula in it.

i.e. c132=sumc1:c131

i need to have an error message appear in the sum of c132
is greater than 65. i can get the validation to work on a
cell that has a number entered directly but cannot get it
to work on a cell that has a formula.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Validating a Formula

One way:

Put this in the worksheet code module


Private Sub Worksheet_Calculate()
If Range("C132").Value 65 Then MsgBox "C132 65"
End Sub

You might also consider using Conditional Formatting to change the
cell color instead.

In article ,
"Cath" wrote:

I am trying to validate a cell that has a formula in it.

i.e. c132=sumc1:c131

i need to have an error message appear in the sum of c132
is greater than 65. i can get the validation to work on a
cell that has a number entered directly but cannot get it
to work on a cell that has a formula.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Validating a Formula

Just to add, Data Validation is only applied when you make a manual change
to a cell.

--
Regards,
Tom Ogilvy

"J.E. McGimpsey" wrote in message
...
One way:

Put this in the worksheet code module


Private Sub Worksheet_Calculate()
If Range("C132").Value 65 Then MsgBox "C132 65"
End Sub

You might also consider using Conditional Formatting to change the
cell color instead.

In article ,
"Cath" wrote:

I am trying to validate a cell that has a formula in it.

i.e. c132=sumc1:c131

i need to have an error message appear in the sum of c132
is greater than 65. i can get the validation to work on a
cell that has a number entered directly but cannot get it
to work on a cell that has a formula.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validating cells [email protected] Excel Discussion (Misc queries) 1 October 30th 08 12:53 AM
validating Philashley Excel Discussion (Misc queries) 2 March 13th 08 03:54 PM
data validation: formula for validating only multiples of 10 Excelnovice Excel Worksheet Functions 3 May 15th 06 07:17 PM
validating Ayesha Excel Worksheet Functions 2 April 26th 06 02:56 PM
Validating Sdbenn90 Excel Discussion (Misc queries) 0 March 27th 06 12:05 AM


All times are GMT +1. The time now is 08:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"