Count IF Help

Xineq

New Member
Joined
Aug 29, 2014
Messages
34
Hello MrExcel

I'm atm trying to make a VBA Code that works the same way as CountIf in excel. The Countif i'm useing in excel goes like this =CountIf(B2:B100;2 - Not good) (this goes for all the prioritys 1 - 3). I was hoping you could help me make this to VBA Code, and will be able to look like this.

PriorityAmount
1 - Really bad1
2 - Not good2
3 - OK2
SUM5

<tbody>
</tbody>


This is a outtake from my excel
ABCDEFGH
CasePriorityTitleTitle-LongStatusProjectTypeTags
13555123 - OKTitle1TitleName 1
Active

<tbody>
</tbody>
2014-3

<tbody>
</tbody>
BugBlank
42152112 - Not goodTitle2

<tbody>
</tbody>
Active

<tbody>
</tbody>
2014-3

<tbody>
</tbody>
Bug
blank

<tbody>
</tbody>
42134511 - Really badTitle4

<tbody>
</tbody>
Active

<tbody>
</tbody>
2014-3

<tbody>
</tbody>
inquiry
blank

<tbody>
</tbody>
41423412 - Not goodTitle10

<tbody>
</tbody>
Active

<tbody>
</tbody>
2014-5

<tbody>
</tbody>
inquiryTag 3
14566213 - OKTitle 6

<tbody>
</tbody>
Active

<tbody>
</tbody>
2014-4

<tbody>
</tbody>
BugTag 5

<tbody>
</tbody>
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
What cell range is the list of result text in ?
Code:
Priority	
1 - Really bad
2 - Not good
3 - OK
SUM
What Excel version are you using ?
Have you considered a Pivot Table....no formula required !!!
 
Upvote 0
I'm using Excel 2010.
i have tried Pivot tables, but i'm not really happy with the results.
The Cell range will be J2:K6 i think (i hope that is what you are asking for)
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,047
Members
448,940
Latest member
mdusw

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