ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count if begins with AAA (https://www.excelbanter.com/excel-programming/397664-count-if-begins-aaa.html)

Neall

Count if begins with AAA
 
I am wondering if I can this

search a row and return a numeric representation of cells in that row that
start with the letters "www"

Thanks in advance
--
Neall

JW[_2_]

Count if begins with AAA
 
You can use a CountIf formul for that. This will count all cells
within row 11 that starts with "www".
=COUNTIF(11:11,"www*")

If you want to do a column, then:
=COUNTIF(A:A,"www*")

Neall wrote:
I am wondering if I can this

search a row and return a numeric representation of cells in that row that
start with the letters "www"

Thanks in advance
--
Neall



Mike H

Count if begins with AAA
 
Hi,

Right click the sheet tab, view code and paste this in.
Select the row you want to search and run this:-

Sub sonic()
Dim myRange As Range
Set myRange = Selection
For Each c In myRange
If UCase(Left(c.Value, 3)) = "WWW" Then Count = Count + 1
Next
MsgBox Count
End Sub

Mike

"Neall" wrote:

I am wondering if I can this

search a row and return a numeric representation of cells in that row that
start with the letters "www"

Thanks in advance
--
Neall



All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com