Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Count function

I am trying to count the number of occurences that the word "equity" appears
in a range. The range is always going to be column U. However, U3 will
always be the first cell in the range but the last cell varies depending on
the data. So I am running a loop to get to the bottom of the range. Once
there I want to run a count command that will count the number of times
"equity" appears in the column.

I am getting an error on my "countif" part that says sub or function not
defined. Not sure if I am even using this correctly. Any ideas?


Sub counting()

Range("U3").Activate

Do Until ActiveCell = ""
ActiveCell.Offset(1, 0).Select

Loop

ActiveCell.Value = CountIf("U3, ActiveCell.Offset(-1, 0)", "Equity")

End Sub


Thanks

Cluckers
 
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
Count Function Mickey Excel Worksheet Functions 5 November 12th 08 11:55 PM
COUNT Function SiH23 Excel Discussion (Misc queries) 3 November 2nd 08 09:28 PM
Count/if/and function? tonyalt3 Excel Worksheet Functions 6 March 25th 08 09:26 PM
Count If Function benny Excel Worksheet Functions 10 October 4th 07 02:45 PM
i need help with the "count" function kippercat Excel Worksheet Functions 1 March 9th 05 09:58 AM


All times are GMT +1. The time now is 05:09 PM.

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

About Us

"It's about Microsoft Excel"