Solved

Excel sumproduct calculation with LEFT and variable length of characters

Posted on 2010-09-02
2
415 Views
Last Modified: 2012-05-10
I want to add sales figures for products using sumproduct and LEFT. But the search terms I use have variable length of characters. It is difficult to explain but please view the code. In A9 I will enter the first several letters of the product I want to total such as "Sony *". The way the formula works I would have to use the same number of characters for each product I am totaling, in this case 3 letters
(LEFT('2009'!$D$2:$D$65500,3)=A9)
I need it to allow for a varying number of characters in A9

SUMPRODUCT(('2009'!$G$2:$G$65500>=DATEVALUE($A42&" "&$A41&" "&$A40))*('2009'!$G$2:$G$65500<=DATEVALUE($B42&""&$B41&""&$B40))*(LEFT('2009'!$D$2:$D$65500,3)=A9)*('2009'!$H$2:$H$65500))

Open in new window

0
Comment
Question by:RTsal
2 Comments
 
LVL 3

Accepted Solution

by:
Peter_Werner earned 500 total points
ID: 33591363
LEFT(...,LEN(A9))=A9

You use " " and "" at DATEVALUE().  Don't you need "-" or "/"?
0
 

Author Closing Comment

by:RTsal
ID: 33596362
Datevalue works fine - thanks
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

789 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