Conditional Sum problem

W

WembleyBear

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
 
S

Stefi

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

Regards,
Stefi

„WembleyBear†ezt írta:
 
J

Jarek Kujawa

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top