+ Reply to Thread
Results 1 to 4 of 4

Q about: IfAnd or is it AndIf?

  1. #1
    Michael Saffer
    Guest

    Q about: IfAnd or is it AndIf?

    Dear folks,

    I have used either the "andif" or is it "ifand"? function before, but for
    the life of me right now
    I can't remember the right way to make this work. This is my huge problem
    de jour.


    A B C D E
    101940 1/13/2006 Friday 280
    101940 1/20/2006 Friday 250 ?
    101941 1/14/2006 Saturday 280
    101941 1/21/2006 Saturday 280 ?


    I have to show the difference between D2 and D1 in cell E2 but only if A2=A1
    and C2=C1.

    I have to show the difference between D4 and D3 in cell E4 but only if A4=A3
    and C4=C3.

    The correct answers would be E2 = -30 and E4 = 0

    Thank you very much. I really appreciate it.


    Michael Saffer
    Jacksonville, Florida



  2. #2
    Damon Longworth
    Guest

    Re: Q about: IfAnd or is it AndIf?

    Try something similar to:

    =if(and(A2=A1,C2=C1),D2-D1,0)

    --
    Damon Longworth

    2006 East Coast Excel User Conference
    April 19/21st, 2006
    Holiday Inn, Boardwalk
    Atlantic City, New Jersey
    Early Bird Registration Now Open!!
    www.ExcelUserConference.com

    2006 UK Excel User Conference
    Summer, 2006
    London, England
    "Michael Saffer" <[email protected]> wrote in message
    news:[email protected]...
    Dear folks,

    I have used either the "andif" or is it "ifand"? function before, but for
    the life of me right now
    I can't remember the right way to make this work. This is my huge problem
    de jour.


    A B C D E
    101940 1/13/2006 Friday 280
    101940 1/20/2006 Friday 250 ?
    101941 1/14/2006 Saturday 280
    101941 1/21/2006 Saturday 280 ?


    I have to show the difference between D2 and D1 in cell E2 but only if A2=A1
    and C2=C1.

    I have to show the difference between D4 and D3 in cell E4 but only if A4=A3
    and C4=C3.

    The correct answers would be E2 = -30 and E4 = 0

    Thank you very much. I really appreciate it.


    Michael Saffer
    Jacksonville, Florida




  3. #3
    Dave Peterson
    Guest

    Re: Q about: IfAnd or is it AndIf?

    In E2:
    =if(and(a2=a1,c2=c1),d2-d1,"")
    (show nothing if a2 is different from A1 or C2 is different from C1?

    In E4:
    =if(and(a4=a3,c4=c3),d4-d3,"")


    Michael Saffer wrote:
    >
    > Dear folks,
    >
    > I have used either the "andif" or is it "ifand"? function before, but for
    > the life of me right now
    > I can't remember the right way to make this work. This is my huge problem
    > de jour.
    >
    > A B C D E
    > 101940 1/13/2006 Friday 280
    > 101940 1/20/2006 Friday 250 ?
    > 101941 1/14/2006 Saturday 280
    > 101941 1/21/2006 Saturday 280 ?
    >
    > I have to show the difference between D2 and D1 in cell E2 but only if A2=A1
    > and C2=C1.
    >
    > I have to show the difference between D4 and D3 in cell E4 but only if A4=A3
    > and C4=C3.
    >
    > The correct answers would be E2 = -30 and E4 = 0
    >
    > Thank you very much. I really appreciate it.
    >
    > Michael Saffer
    > Jacksonville, Florida


    --

    Dave Peterson

  4. #4
    Michael Saffer
    Guest

    Re: Q about: IfAnd or is it AndIf?

    Thank you Dave and Damon.
    I am able to use both solutions with the similar results.
    I will adapt your solutions to fix the problem I had.
    Emphasis on "had".

    This forum is incredible.

    Thank you very much,

    Michael Saffer
    Jacksonville, Florida







    "Damon Longworth" <[email protected]> wrote in message
    news:[email protected]...
    > Try something similar to:
    >
    > =if(and(A2=A1,C2=C1),D2-D1,0)
    >
    > --
    > Damon Longworth
    >
    > 2006 East Coast Excel User Conference
    > April 19/21st, 2006
    > Holiday Inn, Boardwalk
    > Atlantic City, New Jersey
    > Early Bird Registration Now Open!!
    > www.ExcelUserConference.com
    >
    > 2006 UK Excel User Conference
    > Summer, 2006
    > London, England
    > "Michael Saffer" <[email protected]> wrote in message
    > news:[email protected]...
    > Dear folks,
    >
    > I have used either the "andif" or is it "ifand"? function before, but for
    > the life of me right now
    > I can't remember the right way to make this work. This is my huge problem
    > de jour.
    >
    >
    > A B C D E
    > 101940 1/13/2006 Friday 280
    > 101940 1/20/2006 Friday 250 ?
    > 101941 1/14/2006 Saturday 280
    > 101941 1/21/2006 Saturday 280 ?
    >
    >
    > I have to show the difference between D2 and D1 in cell E2 but only if
    > A2=A1
    > and C2=C1.
    >
    > I have to show the difference between D4 and D3 in cell E4 but only if
    > A4=A3
    > and C4=C3.
    >
    > The correct answers would be E2 = -30 and E4 = 0
    >
    > Thank you very much. I really appreciate it.
    >
    >
    > Michael Saffer
    > Jacksonville, Florida
    >
    >
    >




+ 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