Question

So say for example I have a set of columns going down (i.e Sample 1...Sample n) is there a function that can check to see that it has String Test && integer. Then counts it. So I know an if function is needed, but whats the function to check to see that it has a String value and integer i'm assuming its some thing like:

IF( add 1 to

I saw:Excel - Search through a column to find if text matches and count string

But it doesn't seem to relate as much

Était-ce utile?

La solution

ok, was hoping you would respond to my comment before I posted this answer but here it is. (also assuming you are using at least office 2010)

You can accomplish this by utilizing COUNTIFS and adding in the criteria to look for. Example below

in column A we write the text: Test 1
Copy that down 20 cells or so. the cells should now count up to 20 with test in front of the number. we now add our formula to count column A and look for the word "Test " and a number

=COUNTIFS(A:A,"Test " & "?*")

if you change the value of Test to say Tesst it will recalculate and provide you the correct number matching the criteria.

Autres conseils

What most simple I can give you as of now is:

=COUNTIF(A1:A20,"?*")

This will omit blank cells and cells contain only number. I'm unaware about a function that can count cells containing only alphabets. Else another count with that criteria can be simply minus from the above will return exactly what you need.

Think I should go for a macro. If I can come up with something I'll repost.

Currently what it will return:

  • aa45er --- (mixed, starts with alphabet) yes
  • 223drt --- (mixed, starts with number) yes
  • --- (blank) no
  • 675 --- (only number) no
  • ttfy --- (only text) YES : but we have to omit it

Final count: 3 (should be 2??)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top