Solved

My SUPRODUCT formula gives wrong amount

Posted on 2015-01-16
7
66 Views
Last Modified: 2015-01-16
Hello,

can you please help me, why my sumproduct formula do not give correct amount?

Capture.PNGBook1.xlsx
0
Comment
Question by:Flora
7 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40553000
There are two reasons:

1. You are trying to use the dates 31-38 September 2013.
2. You are also using "2013", which is not a date.
0
 
LVL 5

Expert Comment

by:Leon Kammer
ID: 40553004
The data type you have in the left hand column must be constant, so if you have 2013 it will take this as an integer, not a date.
Also you have dates that are not valid.
If you put in 2013-01-01 for 2013 and 2014-01-01 for 2014, this will bring the SUM back into line.

Cheers

Leon
0
 
LVL 5

Author Comment

by:Flora
ID: 40553006
my data is huge and if i keep changing every one of the cells it will take forever.

how the sumproduct formula can be adjusted, so that it considers that 2013 and 2014 as well. without changing anything in the source data. ?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40553007
HI,

pls try

=SUMPRODUCT(Expense,--(1*(LEFT(DateD,4))=G4))

I've changed the named range with minus 1 at the end
=OFFSET(Sheet1!$A$2,,,COUNTA(Sheet1!$A:$A)-1)

Regards
EE20150116.xlsx
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40553009
Change the formula to

=SUMPRODUCT(Expense,--ISNUMBER(MATCH(YEAR(DateD),G4,0)))+SUMIF(DateD,G4,Expense)

However, that will not total the information for 31-38 September, so that if that is genuine data, then you should correct the data in that instance, not the formula.
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 40553010
Copy-of-Book1.xlsx

check this
0
 
LVL 5

Author Closing Comment

by:Flora
ID: 40553017
Thank you all.

only Rgonzo1971  solutions worked perfectly.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now