+ Reply to Thread
Results 1 to 8 of 8

Excel Logical Formula

  1. #1
    ju1eshart
    Guest

    Excel Logical Formula

    I have the following formula
    =IF(AND(J5<316226),"Green",IF(AND(J5>=3162277),"Red",IF(AND(J5>=316228),"Amber",IF(AND(J5<=3162276),"Amber"))))
    I'd like to include the comment "NO DATA" if the ref cell is not populated
    with a value. I thought " " ment empty cell but I can't get it to work.
    Thanks in advance for your help

  2. #2
    Stefi
    Guest

    RE: Excel Logical Formula

    Try "" (without space between quotation marks) or function ISBLANK(A1)!

    Regards,
    Stefi



    „ju1eshart” ezt *rta:

    > I have the following formula
    > =IF(AND(J5<316226),"Green",IF(AND(J5>=3162277),"Red",IF(AND(J5>=316228),"Amber",IF(AND(J5<=3162276),"Amber"))))
    > I'd like to include the comment "NO DATA" if the ref cell is not populated
    > with a value. I thought " " ment empty cell but I can't get it to work.
    > Thanks in advance for your help


  3. #3
    Franz Verga
    Guest

    Re: Excel Logical Formula

    Nel post news:[email protected]
    *ju1eshart* ha scritto:

    > I have the following formula
    > =IF(AND(J5<316226),"Green",IF(AND(J5>=3162277),"Red",IF(AND(J5>=316228),"Amber",IF(AND(J5<=3162276),"Amber"))))
    > I'd like to include the comment "NO DATA" if the ref cell is not
    > populated with a value. I thought " " ment empty cell but I can't get
    > it to work. Thanks in advance for your help



    Try this way:

    =IF(J5="","",IF(J5<316226,"Green",IF(J5>=3162277,"Red",IF(J5>=316228,"Amber",IF(J5<=3162276,"Amber")))))

    --
    Hope I helped you.

    Thanks in advance for your feedback.

    Ciao

    Franz Verga from Italy



  4. #4
    David Biddulph
    Guest

    Re: Excel Logical Formula

    "ju1eshart" <[email protected]> wrote in message
    news:[email protected]...
    >I have the following formula
    > =IF(AND(J5<316226),"Green",IF(AND(J5>=3162277),"Red",IF(AND(J5>=316228),"Amber",IF(AND(J5<=3162276),"Amber"))))
    > I'd like to include the comment "NO DATA" if the ref cell is not populated
    > with a value. I thought " " ment empty cell but I can't get it to work.
    > Thanks in advance for your help


    If the cell is empty, try "", not " ".
    What are your AND functions trying to do, as in each case there seems to be
    only one argument?
    --
    David Biddulph



  5. #5
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    =IF(AND(J5<316226),"Green",IF(AND(J5>=3162277),"Re d",IF(AND(J5>=316228),"Amber",IF(AND(J5<=3162276), "Amber"))))
    I'd like to include the comment "NO DATA" if the ref cell is not populated
    with a value. I thought " " ment empty cell but I can't get it to work.
    Thanks in advance for your help

    You do not need the AND statements in your original expression

    IF(J5<316226,"Green",IF(J5>=3162277,"Red",IF(J5>=316228,"Amber",IF(J5<=3162276, "Amber",if(isblank(j5),"NO DATA"," ")))))

    or even
    IF(J5<316226,"Green",IF(J5>=3162277,"Red",IF(J5>=316228,"Amber",IF(J5<=3162276, "Amber","NO DATA"," "))))

    If it is just the only situation left
    Regards

    Dav

  6. #6
    Don Guillett
    Guest

    Re: Excel Logical Formula

    I am also confused about what you are doing but try this idea
    =if(and(j5>=316226,,j5<3162276),"amber",next if)

    Don Guillett
    SalesAid Software
    [email protected]
    "ju1eshart" <[email protected]> wrote in message
    news:[email protected]...
    >I have the following formula
    > =IF(AND(J5<316226),"Green",IF(AND(J5>=3162277),"Red",IF(AND(J5>=316228),"Amber",IF(AND(J5<=3162276),"Amber"))))
    > I'd like to include the comment "NO DATA" if the ref cell is not populated
    > with a value. I thought " " ment empty cell but I can't get it to work.
    > Thanks in advance for your help




  7. #7
    ju1eshart
    Guest

    Re: Excel Logical Formula

    Thanks Franz. Your suggestion worked the best. Your help is much appreciated.
    Jules - Scotland

    "Franz Verga" wrote:

    > Nel post news:[email protected]
    > *ju1eshart* ha scritto:
    >
    > > I have the following formula
    > > =IF(AND(J5<316226),"Green",IF(AND(J5>=3162277),"Red",IF(AND(J5>=316228),"Amber",IF(AND(J5<=3162276),"Amber"))))
    > > I'd like to include the comment "NO DATA" if the ref cell is not
    > > populated with a value. I thought " " ment empty cell but I can't get
    > > it to work. Thanks in advance for your help

    >
    >
    > Try this way:
    >
    > =IF(J5="","",IF(J5<316226,"Green",IF(J5>=3162277,"Red",IF(J5>=316228,"Amber",IF(J5<=3162276,"Amber")))))
    >
    > --
    > Hope I helped you.
    >
    > Thanks in advance for your feedback.
    >
    > Ciao
    >
    > Franz Verga from Italy
    >
    >
    >


  8. #8
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    =IF(K1="","no data",IF(K1<5,"green",IF(AND(K1>4,K1<9),"amber","red")))


    this gives you no data if cell k1 is empty, and either red or amber or green according to the value of k1................

+ 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