+ Reply to Thread
Results 1 to 3 of 3

if declaration

  1. #1
    ashw1984
    Guest

    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. #2
    Toppers
    Guest

    RE: 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. #3
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1