if declaration

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i am trying to test whether "e7" is within a "h7"% of "b7"
If Abs((Range("b7").Value) / (Range("e7").Value)) < ((Range("h9").Value) /
100) Then
can anybody suggest why this does not work
and/or how to do this thank's
 
Hi,
Assuming H7 contains a % then:

If Abs((Range("b7").Value) - (Range("e7").Value)) <= Range("h7").Value *
Range("b7") Then
 
If Abs((Range("B7").Value * (1 + Range("H7").Value / 100))) >=
Range("E7").Value And _
Abs((Range("B7").Value * (1 - Range("H7").Value / 100))) <=
Range("E7").Value Then
MsgBox "yes"
End If


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top