Sumproduct and Text string

daily106

Board Regular
Joined
Dec 20, 2004
Messages
158
Hi all ,

I am trying to sum project IF the first 12 characters of a named range "Tasksname" and the first 12 characters of a1 is a match. What am I doing wrong here? Thank you.

=SUMPRODUCT(--(LEFT(taskname,12)=LEFT(a1,12)),project)
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
1. What is:
project
? Hopefully a range (a) the same size as Tasksname, and (b) contains numbers.

2. I note you have different spellings of Tasksname and taskname.

3. What is the error (or wrong result) you're getting, and what should it be.

You're a little short on details.
 
Upvote 0
1. What is project?
It is the named range of cost for projects. It is the same length.

2. I note you have different spellings of Tasksname and taskname.
It they are the same. My spelling error. Tasksname.

3. What is the error (or wrong result) you're getting, and what should it be.
I am getting VALUE error for this.

I am trying to do is if the first 12 digits of named range of "taskname" is the same as first 12 digits of the cell A1 then add project amounts. Hope I cleared things out. Thank you.
 
Upvote 0
Tasksname and project NOT being the same dimension could cause the #VALUE error.
Cut and paste the range definitions (RefersTo:) for both named ranges here.
 
Upvote 0
Thank you all. I got it to work by using the formular below.

{=SUM(IF(LEFT(taskname,16)=LEFT(a1,16),project,0))}

How could I add another condition of named date ranges "dateinformation"?

{=SUM(IF((dateinformation>DATE(2011,1,1))*(LEFT(taskname,16)=LEFT(a1,16),project,0)}
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top