SUM text.

ebeyert

Active Member
Joined
Sep 15, 2006
Messages
287
I have a row D37 to AA37 with fitness exercises (text). Table D18 to AA18 contains all fitness exercises (also text). Now I want to add in D49 the number of exercises (text) described in row D37 to AA37 that correspond in the table D1818 to AA18.. I am trying with count, countif, sumproduct, etc but nothing work.
Tkanks for helping me out
BEst regards
Ellerd
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
What condition has to be met to add the values? For example has de excercise in D18 to be the same as in D37 for it to count as 1? Or if excercise in D18 is in the list of excecises from D37:A37 then you count 1?
 
Upvote 0
Something like this?:

Count if D18 = D37, E19 = E37,...
Libro1
CDEFGH
18All ExcercisesExcercise01Excercise02Excercise03Excercise04Excercise05
37Some ExcercisesExcercise01Excercise04Excercise03Excercise05
49Formula3
Example 1
Cell Formulas
RangeFormula
D49D49=SUM((D18:H18=D37:H37)*1)

Or something like this?:
Counts 1 if excercise in row 37 appears in the list of all excercises
Libro1
CDEFGH
18All ExcercisesExcercise01Excercise02Excercise03Excercise04Excercise05
37Some ExcercisesExcercise02Excercise01Excercise03Excercise03
49Formula4
Example 2
Cell Formulas
RangeFormula
D49D49=SUM(BYCOL(D37:H37,LAMBDA(x,SUM((D18:H18=x)*1))))
 
Upvote 0
Felixstraube, Thanks for you reply. Your last formula is correct, because I have 4 x exercises in D37-H18, all 4 of which are also present in D18-H18. The only issue is that if I use your formula with empty cells, it will also add the empty cells?
Thanks
Ellerd
 
Upvote 0
If the cells are truly empty, then you could try:

Excel Formula:
=SUM(--ISNUMBER(MATCH(D37:AA37,D18:AA18,0)))

If they might contain formula that returns "" then you could try:

Excel Formula:
=SUM(--ISNUMBER(MATCH(D37:AA37,FILTER(D18:AA18,D18:AA18<>""),0)))

The second option might also be more efficient if quite a few of the cells in row 18 are empty/"".
 
Upvote 0
FormR, thanks for support and feedback. The second options works great !.
Thanks again
BEst regards
Ellerd
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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