Combined Count by Formatting & Count by last 3 characters in cell

WildWill

Board Regular
Joined
Sep 10, 2009
Messages
92
Hi

I got 2 x solutions for two different problems, and sorted both of them out. Now I have a need to combine these solutions, as follows:

First Problem: I needed to count cells by formatting. The solution was to place some VBA code in a module and use the "ColorFunction(O4,$C$3:$L$33,FALSE)" formula, where the format to be counted was in O4, and the range of cells to count is C3:L33.

Second Problem: I wanted to count cells which contain a specific string of text, and the solution was the formula "COUNTIF(C3:L33,"*"&O11)", where the text string to be counted was contained in O11.

For the same situation and data range, I now need to count the cells in C3:L33 where the last three characters are = the value in O11 AND where the format is equal to the format in O4.

I considered a SUMPRODUCT but dont know how to set it up? Is there an easier way?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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