Sum of last 10 cells to contain partial text

JBeau16

New Member
Joined
Jan 18, 2024
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I am looking to find the number of cells in the last 10 occurrences that contain a specific text, but can't seem to get the formulas correct to include the criteria of the partial text.

Below is the list of "results" which I add to row by row as they occur. I am looking to input in a different cell the number of cells that contain "W" from the last 10 rows that aren't blank. The formula below is as far as I can figure.

=SUM(TAKE(FILTER(H3:H84,H3:H84<>0),-10))

Result
W
SOW
L
W
L
L
L
OTW
W
W
L
OTW
OTW
L
W
L
W
W
L
W
W
OTL
W
L
L
L
L
W
W
OTL
SOL
W
SOL
L
W
W
W
W
W
SOL
W
OTW
L
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi & welcome to MrExcel.
How about
Excel Formula:
=LET(a,TAKE(FILTER(H3:H84,H3:H84<>0),-10),ROWS(FILTER(a,ISNUMBER(FIND("w",a)))))
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=LET(a,TAKE(FILTER(H3:H84,H3:H84<>0),-10),ROWS(FILTER(a,ISNUMBER(FIND("w",a)))))
Still not working, I believe it isn't converting the value of the cell containing "w" to a number, so it is coming back with #CALC!
 
Upvote 0
Oops, it should be search & not find
Excel Formula:
=LET(a,TAKE(FILTER(H3:H84,H3:H84<>""),-10),ROWS(FILTER(a,ISNUMBER(SEARCH("w",a)))))
 
Upvote 1
Solution
Oops, it should be search & not find
Excel Formula:
=LET(a,TAKE(FILTER(H3:H84,H3:H84<>""),-10),ROWS(FILTER(a,ISNUMBER(SEARCH("w",a)))))
That worked for the "w", which is great, thank you!

Now if I am looking to do the same for just the cell's with the value of L without including the SOL or OTL how would I do that?
 
Upvote 0
How about
Excel Formula:
=LET(a,TAKE(FILTER(H3:H84,H3:H84<>0),-10),ROWS(FILTER(a,a="L")))
 
Upvote 1
You're welcome & thanks for the feedback.
 
Upvote 0
I am using this formula to count the number of results in the last 10 rows that include "ol", but as of right now there are none in the last 10 rows, so the cell is coming up with #CALC!

I understand that I need to add a 0 for the "if empty" into the FILTER, but when I do it changes the result to 1, which is incorrect. Any thoughts?

=LET(a,TAKE(FILTER(H3:H84,H3:H84<>""),-10),ROWS(FILTER(a,ISNUMBER(SEARCH("ol",a)))))
 
Upvote 0
You need to use
Excel Formula:
=LET(a,TAKE(FILTER(H3:H84,H3:H84<>""),-10),iferror(ROWS(FILTER(a,ISNUMBER(SEARCH("ol",a)))),""))
 
Upvote 1

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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