Sum specific word in area

szakharov7723

Board Regular
Joined
Jun 22, 2018
Messages
85
Office Version
  1. 2019
Platform
  1. Windows
Hello,
I have 5 columns, all of them can contain specific word
6th column is numbers.
Is it possible to take all 5 columns, find if cells contain specific word and sum the number if it does.

For example here I want to sum numbers of red only :
redblueyellow5
blueredyellowblue2
yellowbluered4
greengreenbluered8

<tbody>
</tbody>

the result will be 5+2+4+8 =19

I tried Sumproduct (--(A1:E4="red"),F1:F4) And it didn't work.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
=SUMPRODUCT((A1:E4="red")*(F1:F4))

gives 19

NOTE: ALL occurrences of the colour add the row number,

so Blue gives 21
Row 1, 1 occurrence = 5
Row 2, 2 occurrences = 2 + 2
Row 3, 1 occurrence = 4
Row 4, 1 occurrence = 8
= 5 + 2 + 2 + 4 + 8 = 21
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,412
Members
448,960
Latest member
AKSMITH

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