Dear folks,
I have used either the quot;andifquot; or is it quot;ifandquot;? 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
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
quot;Michael Safferquot; gt; wrote in message
...
Dear folks,
I have used either the quot;andifquot; or is it quot;ifandquot;? 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
In E2:
=if(and(a2=a1,c2=c1),d2-d1,quot;quot;)
(show nothing if a2 is different from A1 or C2 is different from C1?
In E4:
=if(and(a4=a3,c4=c3),d4-d3,quot;quot;)Michael Saffer wrote:
gt;
gt; Dear folks,
gt;
gt; I have used either the quot;andifquot; or is it quot;ifandquot;? function before, but for
gt; the life of me right now
gt; I can't remember the right way to make this work. This is my huge problem
gt; de jour.
gt;
gt; A B C D E
gt; 101940 1/13/2006 Friday 280
gt; 101940 1/20/2006 Friday 250 ?
gt; 101941 1/14/2006 Saturday 280
gt; 101941 1/21/2006 Saturday 280 ?
gt;
gt; I have to show the difference between D2 and D1 in cell E2 but only if A2=A1
gt; and C2=C1.
gt;
gt; I have to show the difference between D4 and D3 in cell E4 but only if A4=A3
gt; and C4=C3.
gt;
gt; The correct answers would be E2 = -30 and E4 = 0
gt;
gt; Thank you very much. I really appreciate it.
gt;
gt; Michael Saffer
gt; Jacksonville, Florida
--
Dave Peterson
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 quot;hadquot;.
This forum is incredible.
Thank you very much,
Michael Saffer
Jacksonville, Florida
quot;Damon Longworthquot; gt; wrote in message
...
gt; Try something similar to:
gt;
gt; =if(and(A2=A1,C2=C1),D2-D1,0)
gt;
gt; --
gt; Damon Longworth
gt;
gt; 2006 East Coast Excel User Conference
gt; April 19/21st, 2006
gt; Holiday Inn, Boardwalk
gt; Atlantic City, New Jersey
gt; Early Bird Registration Now Open!!
gt; www.ExcelUserConference.com
gt;
gt; 2006 UK Excel User Conference
gt; Summer, 2006
gt; London, England
gt; quot;Michael Safferquot; gt; wrote in message
gt; ...
gt; Dear folks,
gt;
gt; I have used either the quot;andifquot; or is it quot;ifandquot;? function before, but for
gt; the life of me right now
gt; I can't remember the right way to make this work. This is my huge problem
gt; de jour.
gt;
gt;
gt; A B C D E
gt; 101940 1/13/2006 Friday 280
gt; 101940 1/20/2006 Friday 250 ?
gt; 101941 1/14/2006 Saturday 280
gt; 101941 1/21/2006 Saturday 280 ?
gt;
gt;
gt; I have to show the difference between D2 and D1 in cell E2 but only if
gt; A2=A1
gt; and C2=C1.
gt;
gt; I have to show the difference between D4 and D3 in cell E4 but only if
gt; A4=A3
gt; and C4=C3.
gt;
gt; The correct answers would be E2 = -30 and E4 = 0
gt;
gt; Thank you very much. I really appreciate it.
gt;
gt;
gt; Michael Saffer
gt; Jacksonville, Florida
gt;
gt;
gt;
- Aug 28 Tue 2007 20:38
Q about: IfAnd or is it AndIf?
close
全站熱搜
留言列表
發表留言