COUNTIF Function After SUBSTITUTE Function

Jan 3, 2012

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?

View 9 Replies


ADVERTISEMENT

Using Substitute Function In VBA?

Feb 7, 2012

Following code doesn't work

Dim Value1 as String
Value1 = Substitute(Cells(4, "A"), "A", "", 1)

correct syntax to assign the result of substitute function in the Variable?

View 3 Replies View Related

Wildcards In Substitute Function

Jul 10, 2007

I have numeric values in approx 1000 cell entries that I need to edit:

example cell C1 contains the value 00100300308W400

I'm trying to edit this entry to show 00/10-03-003-08W4/0.

I've tried using wildcards with the SUBSTITUTE function:
=SUBSTITUTE(C1,"***************","**/**-**-***-****/*")

View 10 Replies View Related

SUBSTITUTE Function To Replace Commas

Mar 2, 2007

I m using SUBSTITUTE function to replace commas with fullstop so I can multiply the end result with a number. But when I try to multiple for example B2 (0.1831) with 5, i get the VALUE! error.

Value Real Value (after substitute function)
0,1831 0.1831
23,3333 23.3333
12,5199 12.5199
5,5000 5.5000
20,5999 20.5999
24,4671 24.4671
200,0000200.0000
2,5386 2.5386
0,4000 0.4000
1,5019 1.5019

how I can resolve this so I can use the real values for computations (eg Real value *5), without having the VALUE! error message.

View 12 Replies View Related

SUBSTITUTE Function With Wildcard For Symbols?

Sep 30, 2011

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.

This is the formula:

Code:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE
(C6,"/"," "),"%"," "),"!"," "),","," "),"*"," "),"-"," "),"("," "),")"," ")

It works thus far, but I would still like to add more symbols into the nest. Is there a way/formula to do this that replaces ANY symbol with a space?

View 9 Replies View Related

Substitute Function Non-case Sensitive

Nov 2, 2006

is it possible to make a SUBSTITUTE finction non- case sensitive?

For example I want to replace all letters "e" and "E" in a cell.

View 3 Replies View Related

Substitute Function With Find, Mid & Left

May 25, 2007

Got the following formula:-

=LEFT(L5, FIND("(",L5)-1)

I need to add the SUBSTITUTE function to this but can't figure out where it goes if somebody could point me in the right direction please? My substitute formula is SUBSTITUTE(L5,"car","train").

View 4 Replies View Related

Substitute Function Giving TEXT Output?

Oct 2, 2012

I've in cell A1 an entry like this: 123*456*7890

=SUBSTITUTE(A1) in cell 'A2' gives me: 1234567890
=ISTEXT(A2) in cell 'A3' gives me: TRUE

BUT, =A3+1 gives me: 1234567891

Hows that happening? Substitute function gives me the output which is a TEXT, and how is it that when I add 1 to it, I get an answer? Shouldn't I get a #VALUE! error instead?

View 2 Replies View Related

7 Nested Functions Alternative - Substitute Function

Nov 4, 2008

I want to substitute the following "special" characters for an underscore. i need to do 9 different characters!!! is there another way?

as you are limited to 7!!!

excel 2003!

=INDIRECT("_animal_"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2," ","_"),"/","_"),"-","_"),"&","_"),"~","_"), "(", "_"), ")", "_"), "$", "_"), ":", "_"))

View 9 Replies View Related

Indirect Function And Substitute In Order To Create Conditional Dropdown Menus

Jun 26, 2014

I work for a Machine Shop in the Toledo area. We use a quotation sheet to quote our products to our customers. It has 3 cells that describe the Customer, the Contact person at that customer and finally that Contact's Email Address. I have a drop-down menu in each of these cells. The first, Customer, is based off a simple list of our customers. The Contact drop-down then uses the Indirect Function to search the worksheet for that Customer. The drop down is actually based off of a Range Name saved as that Customer's Name.

However the problem is many of my customers have & or , and since Excel does not allow those symbols or even spaces in a Range Name I have to use Substitute to be able to keep the spaces and the & or ,.

It is important that on the Quote Sheet the Name of the Customer is identical to the actual name of the company so I cant use AND instead of &.

Currently my Second drop down, Contacts, has a formula that looks like this {=INDIRECT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($H5,"_"," "), "3", "&"), "2",","))}.

My problem is that when I give the Range Name a Name , my drop down doesn't work and Excel tells me that the above formula results in an error.

View 6 Replies View Related

If Function With CountIF Function?

Feb 22, 2013

I am using the following formula to calculate different criteria entered into one column - for example the user would either type Blue or Red into column H:

=COUNTIF(H2:H24,"Blue")

=COUNTIF(H2:H24,"Red")

Also, In column C, the user enters an answer of either 1 or 0.

What I have learned is each week I must also account for how many blue shirts were given the answer of 1 in column C as well as how many red shirts were also given an answer of 1 in column C. I do not need to bother with knowing how many received a count of 0. How would that formula read?

This would mean the formula would need to look at column H and see the answer of Blue, and look across the corresponding row to see if an answer of 1 had been given to that piece. If so, then count it; otherwise, don't count it.

View 2 Replies View Related

Function If And Countif Together?

May 14, 2014

important columns are: "D", "G", "L".

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....

View 5 Replies View Related

COUNTIF Function: Only If There Is Something

Sep 1, 2008

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.

View 10 Replies View Related

Countif Function

Jan 29, 2007

I'm trying to do a count where column C="Employee" & column E="2008". Below is the formula I have tried and is obviously not working.

=countif(and(C113:C143="Employee",E113:E143="2008")

View 9 Replies View Related

Countif Function In Vba

Feb 15, 2007

I'm trying to use the worksheet function countif in my code and it does not recognize it. But it does recognize counta. Here's a sample of my code.

Private Sub UserForm_Activate()
Dim MyUnion As Range
Set MyUnion = Union(Rows(12), Rows(14), Rows(16), Rows(18), Rows(20), Rows(22), _
Rows(29), Rows(31), Rows(33), Rows(35), Rows(37), Rows(39), _
Rows(46), Rows(48), Rows(50), Rows(52), Rows(54), Rows(56), _
Rows(63), Rows(65), Rows(67), Rows(69), Rows(71), Rows(73))
txtTtlDays.Text = Application.worksheetfunction.countif(MyUnion, "&A")
End Sub

View 4 Replies View Related

Using COUNTIF With Right String Function

Feb 26, 2014

I'm trying to create a formula to return the number of cells where the last 8 characters of a cell end with the string "landline"

My (failed) attempt at creating this is as follows:

=COUNTIF RIGHT(A2:A322,8)="Landline"

View 8 Replies View Related

Using Countif Function For Certain Array

May 2, 2014

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.

View 8 Replies View Related

How To Use A Variable In The Countif Function

May 19, 2014

Is it possible to use a variable in Countif?

See attached sheet. When a number repeats for the 3rd time, I need to reset the
Countif function.

For example;

Countif($A$5:A20,A20).

I need to change the $A$5 to the current row number so we can start the count again. I need to do this several times during the sheet.

We are counting numbers until they repeat for a 3rd time and then we start the count again at that point.

View 1 Replies View Related

Countif/Sumproduct Function?

Mar 9, 2009

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.

View 3 Replies View Related

COUNTIF Function Per Month

Mar 12, 2007

I have a table in which we track our daily issues.. A1 - A6

Resource/Subject/Date/Time Of Failure/Escalated/Tech Int

I want to be able to count the amount of escalations we have per month...
We just enter a Y or N for the escalation field.

I'm not great with Excel and can do a count with the COUNTIF but don't know how to separate my results so that the count is done per month..

Can someone point me in the right direction?

*EDIT* Also my date format is as follow's 04-Jan-07. Should I change that to make it easier to calculate the results?

View 9 Replies View Related

'COUNTIF' Function Is Not Preventing '#N/A'

Jun 5, 2008

I am using the following COUNTIF formula which I am sure is supposed to prevent '#N/A' from appearing (According to [url]

View 12 Replies View Related

Using Wildcard In VBA Countif Function

Nov 5, 2011

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

search = InputBox("Search for", "Search Term")
occurance = WorksheetFunction.CountIf(Cells, search)

MsgBox (occurance)

View 2 Replies View Related

COUNTIF Function Across More Than 1 Column

Dec 19, 2012

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.

View 4 Replies View Related

Count Or Countif Function

Aug 16, 2007

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.

and so on down the cells.

View 9 Replies View Related

Function With COUNTIF And LOOKUP

Jul 3, 2008

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?

View 9 Replies View Related

Using COUNTIF Function Across Different Cells

Apr 23, 2006

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.

View 5 Replies View Related

Countif Function Between Sheets

May 24, 2007

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.

View 4 Replies View Related

COUNTIF Function To Autom. Underline

Aug 18, 2009

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.

View 4 Replies View Related

Use The Countif Function To Look At That Range Of Numbers For

Jul 18, 2006

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.

View 11 Replies View Related

Using Countif Function For Multiple Worksheets

Jan 28, 2010

I am trying to use countif to count the number of times a unique items occurs in multiple worksheets.

For example, I want to count number of times "ITEM1" occurs in row 1 of sheets1, sheets2, sheets3, sheet4, etc. It may look like this:

Sheet1 = 4 entries
Sheet2 = 22 entries
Sheet3 = 5 entries
Sheet4 = 10 entries

So the entire count would be 41 total.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved