Find a word in a table, then use a function

  • Thread starter Thread starter Alonso
  • Start date Start date
A

Alonso

Hi everybody

I have a table with the days of the week, and the shifts for each one
eg
S1 Sun
S2 Sun
S3 Sun
S1 Mon
S2 Mon
etc
on column A
and in column B, the number of items manufactured

On another table, (column D) i have ONLY the days
Sun
Mon
Tue
etc

What I want to do is to sum in column E the total for each day, by reference
to column D
something like "find this value in the other table, and add them"

usually i would have use the sumif
my problem is with the shifts
so i need to find the cells that contains especific text to sum
 
Try this in E1:

=SUMPRODUCT((A$1:A$21<>"")*(RIGHT(A$1:A$21,3)=D1)*(B$1:B$21))

then copy into E2:E7.

Hope this helps.

Pete
 
Thanks Pete

it worked just great


Pete_UK said:
Try this in E1:

=SUMPRODUCT((A$1:A$21<>"")*(RIGHT(A$1:A$21,3)=D1)*(B$1:B$21))

then copy into E2:E7.

Hope this helps.

Pete
 
Back
Top