Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi guys, Am new to this forum but could do with some help. I've just starte working in a bank and need to sharpen up on my excel. I'm not new t programming, but am to VB and its syntax. Also I've never been ver good at debugging. Anyway trying to write a simple function that takes a range then count the number of time a string occurs in it. Heres my code: Function CountStr(ran As Range, Str As String) As Integer Dim temp As Integer temp = 0 For Each x In ran If x = Str Then temp = temp + 1 End If Next x CountStr = temp End Function Any ideas of why this is throwing an error, I'm sure its somethin simple. Any help would be nice. Thanks To -- Tomsk ----------------------------------------------------------------------- Tomski's Profile: http://www.excelforum.com/member.php...fo&userid=2682 View this thread: http://www.excelforum.com/showthread.php?threadid=40075 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Very simple match function help | Excel Worksheet Functions | |||
simple if then function | Excel Worksheet Functions | |||
Simple Function Help ~ Please | Excel Worksheet Functions | |||
A simple function | Excel Programming |