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>
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,716
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
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 !!!
 

Xineq

New Member
Joined
Aug 29, 2014
Messages
34
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,569
Messages
5,596,913
Members
414,110
Latest member
docops

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
Top