Thread: Syntax errot
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Syntax errot

Hi
Sorry -you don't want the quotes "" in the formula.
regards
Paul

On Mar 31, 9:59*pm, Ed wrote:
The worksheet formula appoach is interesting.

How could the "#VALUE " result be corrected?

On Tue, 31 Mar 2009 07:39:25 -0700 (PDT),
wrote:

Hi
As a worksheet formula in cell a13
=if (and(min("a5:a9")< average("a5:a9")*0.95 , max("a5:a9") average
("a5:a9")*1.05) , "fail" , "pass")


As VBA
if min(Range("a5:a9"))< worksheetfunctions.average(Range("a5:a9"))
*0.95 and max(Range("a5:a9")) worksheetfunctions.average(Range
("a5:a9"))* 1.05
then Range("a13").value = *"fail" else Range("a13").value *= "pass"


the VBA should all be on one line


regards
Paul


On Mar 31, 3:08*pm, Ed wrote:
Please advise how to correct syntax error in the following:


if min(a5:a9)< avg(a5:a9)*0.95 and if max(a5:a9) avg(a5:a9)* 1.05
then a13 = *"fail" else a13 = "pass"


Thank you