Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Action taken by Excel when a condition causes a cell's value

  Asked By: Anubis    Date: Aug 25    Category: MS Office    Views: 1217
  

I am new to Excel VBA can someone please help.

I am trying to write a VBA Excel function that will cause Excel to
say "Fail" if the value entered in a cell is out of the required range.

If as a result of a calculation a cell's value changes. How can I get
Excel to act on that change.

Example:
Enter a value in Cell say B35 that is too high or too low
If B35 < 2.5 or > 3.5 Then say "Fail".

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jaspreet Kapoor     Answered On: Aug 25

if(or(b35<2.5,b35>3.5), b35, "Fail")

air code... but i think it'll work

 
Answer #2    Answered By: Elaine Stevens     Answered On: Aug 25

This can be easily accomplished using Excel's built in Data Validation feature.
You don't need VBA at all

 




Tagged: