# How to count cells from last word in row?

1. ## How to count cells from last word in row?

Hi everybody, I'm new here and I'm from Croatia.

I have one question.

I do some statistics and I have rows like this: (with "" I'll mark blank cell)

A B C D E F G H I J K L
1 no x x "" x no x x "" x x x
2 x x x no x x x x x x x x
3 x no x x x "" x x x x no ""

So my question is: What formula is for count, in every row, just cells with "x" but only from last "no" in cell.

In this case result will be 5 for row 1, 8 for row 2 and 0 for row 3.

So this formula should automatically find last "no" in row and from that "no" count just "x's".

Thank you!

2. ## Re: How to count cells from last word in row?

Hello Darjan,

One way:

=SUMPRODUCT((COLUMN(A1:L1)>MAX((A1:L1="no")*COLUMN(A1:L1)))*(A1:L1="x"))

3. ## Re: How to count cells from last word in row?

I went with

``Please Login or Register  to view this content.``
This is an array formula, confirmed with Ctrl+Shift+Enter to exit the cell.

4. ## Re: How to count cells from last word in row?

Try:

``Please Login or Register  to view this content.``

5. ## Re: How to count cells from last word in row?

Thank you all for quick replies and for helping me, all formulas works perfect!!

I'm so happy for I find this forum.

Therefore you all are so good I have one more question if you could help.

So I'll take similar example from my first post.
I need to count maximum just between two "no" in each row.

I put example in attachment.

6. ## Re: How to count cells from last word in row?

I could not do that using a formula, but maybe the other guys could.

I would need to create a user defined function.

It will take me a few minutes.

It is in the attached file.

User =Counter("Your Range") to run it.

``Please Login or Register  to view this content.``

7. ## Re: How to count cells from last word in row?

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1