I am trying to return how many cells contain a string of text as entered by the user but I am struggling to put wildcards around my search term. Below is the code I have so far.

Code:
Dim search as String
Dim occurance As Integer

I've been looking around for a way to use the countif function in excel with a wildcard, I have a excel list with a column containing data which looks like: ....

I'm trying to write this but it returns a 0 when I know there are 3 records that match this criteria: =SUMPRODUCT(('Invoice-Detail'!J2:J50="NewJob_Post.NET")*('Invoice-Detail'!H2:H50="KY_*")). I think the problem is in the wildcard character. I don't know if I should be using COUNTIF or SUMPRODUCT or something else?

In trying to create a formula that remove EVERY symbol from a cell (C6) and replacing it with a space.... the "SUBSTITUTE" function is telling me I have too many nested Substitutes.

I am using COUNTIF functions with Defined Name lists to quickly determine if a certain number is on a list. As a backdrop, I am using Chemical Abstract Service (CAS) numbers and attempting to somewhat streamline chemical approval for a small company. CAS numbers are often in the format of XX-XX-X with varied amounts of numbers. One of the defined lists however does not have dashes.

Thus, I am using cell B1 to enter the CAS# once and then for each list having a column to itself with an associated worksheet with a defined name list. Most of the columns have the function =B1 with the conditional formatting of =COUNTIF(definedname,BX) and formatted to turn red if the chemical is on the list. This is working for all of the columns except for the list that needs the dashes removed. For instance, CAS 64-67-1 is put in B1 and cell B5 has the formula =SUBSTITUTE(B1,"-","") which brings the number to 64671 which matches the number in my defined name list. However, the cell will not turn red. What am I missing?

this is about a project is a granite to be installed in 104 units, these units are divided in 4 types (column "L") K1, K2, K3, K4

I tried IF, SUMIF, COUNTIF, ETC but I think that I need is some combined function that I'm not able to figure out.

as you can see in the attached file, my units 101, 102, etc is not been installed yet (column H is empty), but the units 209, 210, 211, 214 yes was installed on 5/6 for example.

for example, if i use =COUNTIF(H4:H20,">0"), will return me all the H that is not empty (=3), how many kitchen was installed so far, but, I would like to know how many of these returned units (3), is my different types: K1, K2, K3 and K4....

I am trying to count values in cells of column A only if there is something (any value) in corresponding cells in columns B, C, D, and E. If there are no values in cells of columns B, C, D, and E do not count the cell in column A.

I want to use the countif function for a certain array. The range is set by another cell which is made up out of a percentile of an entire row.

The problem is is that excel doesn't see the value it displays so i continuously get a value of 0 in the countif cell. If i fill in the range by hand, which is exactly the same range as the outcome of the percentile the countif cell does give the correct value.

So in short the problem is i guess that the countif cell does not recognize the value because this value is made up by a formula.

I am trying to count number of staff working in any day without deleting the empty cells.(see attached sample sheet). I tried sumproduct as I have two criteria but it is giving me a "zero" result. I only want to count cells in range B3:B32 that does not have "#" sign if there is a staff name if there is a staff name id corresponding cell in Column A within A3:A32.

How do I setup a COUNTIF function so that it 'searches/uses' more than one column for results.

Example: I have a spreadsheet with 20 columns - starting at A1 to T1 - and ending at A100 toT100. I want to use the COUNTIF function to 'search' all of these from A1/T1 to A100/T100 and tell me how many times the number 21 appears across that range of cells.

This COUNTIF function will reference data on a sheet called 50 - so at the moment my current single colum COUNTIF looks like this -=COUNTIF('50'!A1:A100,21) - and it works fine for one colum, but I need to search 20 columns.

I have two columns on sheet called back1! if a number is put in a cell from P5 down to P40 and a corrosponding number matches in K5 to K40 I want to be able to count it as 1.

So if a number is in k6 and a number is in P6 it counts as 1.

Look at 6 weeks of data, using "Tue" as the search parameter. I need to find the last 3 tuesdays (from current cell) and then sum the corresponding values in the cell I designate.

I'm fluent with LOOKUP and already have it finding and summing last few Tuesdays and corresponding sales totals, but I need it to only back THREE Tuesdays consistently, not 2 or 4, which it is sometimes doing now??? How do I force it to look back at "tue" and when it has found three times, it knows to stop and not consider any other Tuesdays it may find further back in the data?

I'm trying to count the number of times a pupil gets a detention which has been rescheduled.

In the main worksheet below I want to be able to count instances like the one on row 11 where John Smith has had a rescheduled detention.

I want to be able to connect this rescheduled detention to John Smith on a different worksheet in the same workbook. On the screenshot below I would like to have Column D as a running total of rescheduled detentions.

I have tried all sorts of permutations of the COUNTIF function but without success.

I'm trying to simply count a range of cells using the countif function. The range is on a different sheet within the same workbook then where the formula is. The formula is =COUNTIF('Aggregated Results'!L3:L22,"yes"). It returns 0 (zero) for the count which is incorrect as three Yes's appear in the range of cells.

look at the attached file. How can I have the text values in Column A automatically be underlined if the concerning value in Column C drops below the value "1"? Note that Column C wont give you number values in this sample book as it refers to another file on my hd.

I have a range of numbers between 1 and 25 in 50 cells.

How could I use the countif function to look at that range of numbers for values between 5 and 10 and count those values that meet the criteria of between 5 and 10?

Or if there is another function to use, let me know.

I need to write a formula in F35 that looks at C4 and if that cell has a # of 25 or greater it will then look at F4 and if that # is greater or equal to 95% it will return a count of 1 in F35. I know how to use the countif function but am stumped when I try to add in the function to look at c4 as a qualifier.

create a formula using the COUNTIF function? I have a number in cell C1 and then numbers from C3:C65. I would like to produce a number count of how many items from c3:c65 are less than the value in c1 which is 24.

I need to count rows that meet 2 criteria. I have seen this help page http://www.ozgrid.com/Excel/count-if.htm but that counts rows with "criteria 1" OR "criteria 2"... I need to count rows that fulfill "criteria 1" AND "criteria 2" ie - count the rows that have todays date AND a cell that says "COMPLETE"

ideally it would be as easy as "=countif(A:F,"today()","COMPLETE") but that doesn't work... any way around this???

I am trying to create a shift roster for my team. My team work in general shift (GS), second shift (SS), third shift (TS). There are situations where some team members come in any of these shift but had to leave midway due to feeling well, so that should be counted as half day. This half day scenario may be in any case GS/SS/TS. I am using COUNTIF to get the sum of GS/SS/TS for each employee which is giving a whole number. I also want to incorporate 3 different variations of half day as Half Day GS (HG), Half Day SS (HS), Half Day TS (HT). My expectation is that for each Half Day only 0.5 should be added in a appropriate shift, but COUNTIF is always counting this as 1. How I can achieve this using countif or any other Excel function? Sample sheet is attached.

I am attempting to create a capital depreciation schedule that gives us our total operating impact for a given calendar year. I can populate my depreciation based on the purchase month, and fill across the schedule the monthly depreciation cost, however, I'm not sure how to stop the depreciation after the item has depreciated fully (say after 36 months).

For example, if someone were to select March 2013 in B5, monthly depreciation should begin in E5 and spread across ONLY 36 months. If they were to select April 2013, the depreciation would begin in F5 and extend ONLY 36 months.

I think it might be possible to do this with an COUNTIF function, but it is not working for me.