Solved

My SUPRODUCT formula gives wrong amount

Posted on 2015-01-16
7
71 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 6

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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 51

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 6

Author Closing Comment

by:Flora
ID: 40553017
Thank you all.

only Rgonzo1971  solutions worked perfectly.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

717 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