ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Sum problem (https://www.excelbanter.com/excel-worksheet-functions/192744-conditional-sum-problem.html)

WembleyBear

Conditional Sum problem
 
I have a table on my spreadsheet simplified below as follows:

Sold
January 12
February 22
March 15
April 20

YTD Total

On the spreadsheet there is also a drop-down list where the user can select
the month they want to look at. My question is the best way to get the sum
for YTD total; in my example if the user selects February then the YTD total
would be 34, but if they select March, then it would be 49 etc. Can you
recommend the best solution to do this please?

Martyn

Excel 2000, Windows Server 2003 over Citrix PS4

Stefi

Conditional Sum problem
 
The drop-down list being in F2 the formula
=SUM(B2:INDEX(A2:A13,MATCH(F2,A2:A13,0)))

Regards,
Stefi

€˛WembleyBear€¯ ezt Ć*rta:

I have a table on my spreadsheet simplified below as follows:

Sold
January 12
February 22
March 15
April 20

YTD Total

On the spreadsheet there is also a drop-down list where the user can select
the month they want to look at. My question is the best way to get the sum
for YTD total; in my example if the user selects February then the YTD total
would be 34, but if they select March, then it would be 49 etc. Can you
recommend the best solution to do this please?

Martyn

Excel 2000, Windows Server 2003 over Citrix PS4


Jarek Kujawa[_2_]

Conditional Sum problem
 
presume yr drop-down list is in D1

"January" is in A2, 12 is B2

in E1 try:

=SUM(OFFSET($E$1,,-3,MATCH(D1,$A$1:$A$12),1))

HIH

WembleyBear

Conditional Sum problem
 
Thanks very much, that worked perfectly!

Martyn




"Stefi" wrote:

The drop-down list being in F2 the formula
=SUM(B2:INDEX(A2:A13,MATCH(F2,A2:A13,0)))

Regards,
Stefi

€˛WembleyBear€¯ ezt Ć*rta:

I have a table on my spreadsheet simplified below as follows:

Sold
January 12
February 22
March 15
April 20

YTD Total

On the spreadsheet there is also a drop-down list where the user can select
the month they want to look at. My question is the best way to get the sum
for YTD total; in my example if the user selects February then the YTD total
would be 34, but if they select March, then it would be 49 etc. Can you
recommend the best solution to do this please?

Martyn

Excel 2000, Windows Server 2003 over Citrix PS4


Stefi

Conditional Sum problem
 
You are welcome! Thanks for the feedback!
Stefi

€˛WembleyBear€¯ ezt Ć*rta:

Thanks very much, that worked perfectly!

Martyn




"Stefi" wrote:

The drop-down list being in F2 the formula
=SUM(B2:INDEX(A2:A13,MATCH(F2,A2:A13,0)))

Regards,
Stefi

€˛WembleyBear€¯ ezt Ć*rta:

I have a table on my spreadsheet simplified below as follows:

Sold
January 12
February 22
March 15
April 20

YTD Total

On the spreadsheet there is also a drop-down list where the user can select
the month they want to look at. My question is the best way to get the sum
for YTD total; in my example if the user selects February then the YTD total
would be 34, but if they select March, then it would be 49 etc. Can you
recommend the best solution to do this please?

Martyn

Excel 2000, Windows Server 2003 over Citrix PS4



All times are GMT +1. The time now is 01:59 AM.

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