Solved

Excel sumproduct calculation with LEFT and variable length of characters

Posted on 2010-09-02
2
416 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
[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
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl Versus AWK? 7 72
Exchange database won't mount 4 106
i am unable to add data to mysql database 6 54
Access table not showing correct column 6 25
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
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…

733 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