+ Reply to Thread
Results 1 to 2 of 2

IF and AND statement

  1. #1
    Registered User
    Join Date
    11-17-2003
    Posts
    31

    Question IF and AND statement

    Hi All,

    I need to write a statement that is along the following: =IF(F4=G4,1,0)+IF(F20=G20,1,0)+IF(G36=F36,1,0) but to only calulate is the cells selected are greater than zero.

    Any ideas?

    Lara

  2. #2
    macropod
    Guest

    Re: IF and AND statement

    Hi Lara,

    If all of the paired cells must be greater than 0, try:
    =IF((F4=G4)*(F4>0),1,0)*IF((F20=G20)*(F20>0),1,0)*IF((G36=F36)*(F36>0),3,0)

    If some of the paired cells must be greater than 0, try:
    =IF((F4=G4)*(F4>0),1,0)+IF((F20=G20)*(F20>0),1,0)+IF((G36=F36)*(F36>0),1,0)

    Cheers

    "lara5555" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi All,
    >
    > I need to write a statement that is along the following:
    > =IF(F4=G4,1,0)+IF(F20=G20,1,0)+IF(G36=F36,1,0) but to only calulate is
    > the cells selected are greater than zero.
    >
    > Any ideas?
    >
    > Lara
    >
    >
    > --
    > lara5555
    > ------------------------------------------------------------------------
    > lara5555's Profile:

    http://www.excelforum.com/member.php...fo&userid=2741
    > View this thread: http://www.excelforum.com/showthread...hreadid=538399
    >




+ 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