M
Mike Scirocco
I wrote a function that creates a code based on a numeric string inside
a cell. The function uses each digit of the cell text to calculate the
output, so the function returns a different number for 1,234.00 than it
does for 1,234.
I wrote the function then entered the function call in a cell so that
the value in the cell is a function of the text in another cell, but the
function never sees the .00, it always sees the value minus the .00.
How can I pass the text in cell to a fuction, not the numeric value in
the cell?
Here's the function call I place in a cell that uses the text in D41 as
an input:
=SumDigitsPlusLength(D41)
Here's the relevant bits of the function:
Public Function SumDigitsPlusLength(inputvalue as string) As String
'inputvalue is always the numeric value not the text from the cell
'e.g. the inputvalue string always contains "1,234", whether the
'cell contains the text "1,234.00" or "1,234".
...
End Function
Thank You,
Mike
a cell. The function uses each digit of the cell text to calculate the
output, so the function returns a different number for 1,234.00 than it
does for 1,234.
I wrote the function then entered the function call in a cell so that
the value in the cell is a function of the text in another cell, but the
function never sees the .00, it always sees the value minus the .00.
How can I pass the text in cell to a fuction, not the numeric value in
the cell?
Here's the function call I place in a cell that uses the text in D41 as
an input:
=SumDigitsPlusLength(D41)
Here's the relevant bits of the function:
Public Function SumDigitsPlusLength(inputvalue as string) As String
'inputvalue is always the numeric value not the text from the cell
'e.g. the inputvalue string always contains "1,234", whether the
'cell contains the text "1,234.00" or "1,234".
...
End Function
Thank You,
Mike