ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum based on conditions (https://www.excelbanter.com/excel-discussion-misc-queries/89949-sum-based-conditions.html)

Hakojin

Sum based on conditions
 
Ok, I need a formula to give me a summed date based on the rank

ex. if rank=1 then due date = start date + 5
if rank=2 then due date = start date + 3
if rank=3 then due date = start date + 1

Date Started(A) Rank(D) Due Date (E)
5/10/06 1 5/15/06
5/08/06 2 5/11/06
5/9/06 3 5/10/06


Trevor Shuttleworth

Sum based on conditions
 
=A2+CHOOSE(D2,5,3,1)

Regards

Trevor


"Hakojin" wrote in message
...
Ok, I need a formula to give me a summed date based on the rank

ex. if rank=1 then due date = start date + 5
if rank=2 then due date = start date + 3
if rank=3 then due date = start date + 1

Date Started(A) Rank(D) Due Date (E)
5/10/06 1 5/15/06
5/08/06 2 5/11/06
5/9/06 3 5/10/06




mrice

Sum based on conditions
 

Try


=IF(B1 = 1,A1+5,IF(B1 = 2,A1+3,IF(B1 = 3,A1+1,"")))

in cell C1


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=544466


Hakojin

Sum based on conditions
 
worked perfect, thank you very much.

"Trevor Shuttleworth" wrote:

=A2+CHOOSE(D2,5,3,1)

Regards

Trevor


"Hakojin" wrote in message
...
Ok, I need a formula to give me a summed date based on the rank

ex. if rank=1 then due date = start date + 5
if rank=2 then due date = start date + 3
if rank=3 then due date = start date + 1

Date Started(A) Rank(D) Due Date (E)
5/10/06 1 5/15/06
5/08/06 2 5/11/06
5/9/06 3 5/10/06





Trevor Shuttleworth

Sum based on conditions
 
You're welcome. Thanks for the feedback


"Hakojin" wrote in message
...
worked perfect, thank you very much.

"Trevor Shuttleworth" wrote:

=A2+CHOOSE(D2,5,3,1)

Regards

Trevor


"Hakojin" wrote in message
...
Ok, I need a formula to give me a summed date based on the rank

ex. if rank=1 then due date = start date + 5
if rank=2 then due date = start date + 3
if rank=3 then due date = start date + 1

Date Started(A) Rank(D) Due Date (E)
5/10/06 1 5/15/06
5/08/06 2 5/11/06
5/9/06 3 5/10/06








All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com