Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
countif not working
vba excel 07
Want to count all strings that are two characters long in a range. Using countif(range, "??") but it doesn't work. The strings are numbers so I think that might be screwing it up. Tried countif(range,"<100") but that didn't work either. John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
countif not working
Hi John
Look at theese examples: Sub CountIt() 'Numbers only Set MyRange = Range("A1:A100") MyCount = WorksheetFunction.CountIf(MyRange, "<100") _ - WorksheetFunction.CountIf(MyRange, "<10") Debug.Print MyCount End Sub Sub CountIt2() 'Numbers and text count Dim MyRange As Range Set MyRange = Range("A1:A100") For Each c In MyRange.Cells If Len(c) = 2 Then MyCount = MyCount + 1 Next Debug.Print MyCount End Sub Hopes this helps. .... Per "John" skrev i meddelelsen ... vba excel 07 Want to count all strings that are two characters long in a range. Using countif(range, "??") but it doesn't work. The strings are numbers so I think that might be screwing it up. Tried countif(range,"<100") but that didn't work either. John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
countif not working
Hi,
Validation using the keys : CTRL + Maj + Enter =Sum(if(len(Your_Range)=2;1)) "John" a écrit dans le message de groupe de discussion : ... vba excel 07 Want to count all strings that are two characters long in a range. Using countif(range, "??") but it doesn't work. The strings are numbers so I think that might be screwing it up. Tried countif(range,"<100") but that didn't work either. John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Countif Range not working | Excel Worksheet Functions | |||
Countif not working | Excel Worksheet Functions | |||
CountIf Array not working | Excel Discussion (Misc queries) | |||
Countif, not working. | Excel Discussion (Misc queries) | |||
countif not working | Excel Discussion (Misc queries) |