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

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default if declaration

Hi,
Assuming H7 contains a % then:

If Abs((Range("b7").Value) - (Range("e7").Value)) <= Range("h7").Value *
Range("b7") Then

"ashw1984" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default if declaration

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)

"ashw1984" wrote in message
...
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




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
Declaration name Robert Hargreaves[_2_] Excel Programming 4 June 6th 05 04:48 PM
duplicate declaration [email protected] Excel Programming 1 March 1st 05 02:03 AM
Public declaration Greg[_16_] Excel Programming 2 January 21st 05 10:53 PM
which declaration to use Peer Excel Programming 3 August 2nd 04 03:17 PM
Declaration? TJF[_2_] Excel Programming 5 December 18th 03 03:26 PM


All times are GMT +1. The time now is 11:26 PM.

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

About Us

"It's about Microsoft Excel"