simple function question
- From: "Don Shepherd" <nospam@xxxxxxxxxx>
- Date: Fri, 10 Jun 2005 21:55:17 -0400
OK, I can't get this function to return anything other than #VALUE! What am
I doing wrong? The function is in a module, and the input parameter is a
reference to a cell containing an integer.
Function my_digit_patt(a) As Integer
Dim ct(9) As Integer
For i = 1 To Len(a)
ct(Val(Mid(a, i, 1))) = ct(Val(Mid(a, i, 1))) + 1
Next
b = 0
For i = 0 To 10
b = b + ct(i) * 10 ^ (10 - i)
Next
my_digit_patt = b
End Function
.
- Follow-Ups:
- Re: simple function question
- From: Don Shepherd
- Re: simple function question
- From: Ron Rosenfeld
- Re: simple function question
- From: Jim Cone
- Re: simple function question
- Prev by Date: Re: How to Make a Loop count by 1% not 1
- Next by Date: Re: Custom Function: Detecting the cell the function is used in
- Previous by thread: Custom Function: Detecting the cell the function is used in
- Next by thread: Re: simple function question
- Index(es):
Relevant Pages
|