LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Search for text in a cell

In column B of my spreadsheet i have descriptions that are about twent
or so words long. I want to count the one's that contain specific tex
such as "Gate 4" contained in the text. I listed the code that i hav
made so far. Could somebody tell me what is wrong with my code.

Sub Count_Gate()

Dim Gate1 As Integer
Dim Gate2 As Integer
Dim Gate4 As Integer

Gate1 = 0
Gate2 = 0
Gate4 = 0

Do
If Columns("B:B") = "Gate 1" Then
Gate1 = Gate1 + 1
End If

Loop Until Range("B:B").End(xlUp).Row

Thank you

Morr

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FIND / SEARCH text compare cell to string in 3rd cell nastech Excel Discussion (Misc queries) 0 October 29th 07 02:51 AM
Search text in a cell J@Y Excel Discussion (Misc queries) 4 June 14th 07 10:50 PM
How to search for text within a cell? Eric Excel Discussion (Misc queries) 9 May 13th 07 04:30 PM
Search text within cell [email protected] Excel Worksheet Functions 2 July 21st 06 02:17 PM
How do I search for specific text and sum the cell to the right? PacRat2001 Excel Worksheet Functions 3 October 12th 05 04:21 AM


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"