LactoseO.D.'d
Board Regular
- Joined
- Feb 22, 2010
- Messages
- 52
Right now I have a function I am using to count the number of "." 's within a cell.
I found it online:
I then use that number of "." 's to perform operations on other cells.
Currently I am populating a dummy column to get the function values, and performing my operations based off those values, then deleting them. This seems redundant and slow. Is there any way I can reference the output of this function within my Sub and skip the whole dummy column?
I found it online:
Code:
Function countchar(Rng As Range, TextToFind As String) As Double
'Function purpose: To count number of instances of a string of
'characters in a range
Dim cl As Range, x As Integer
For Each cl In Rng
For x = 1 To Len(cl)
If Mid(cl, x, Len(TextToFind)) = TextToFind Then
countchar = countchar + 1
End If
Next x
Next cl
End Function
I then use that number of "." 's to perform operations on other cells.
Currently I am populating a dummy column to get the function values, and performing my operations based off those values, then deleting them. This seems redundant and slow. Is there any way I can reference the output of this function within my Sub and skip the whole dummy column?