Draft

From CleanPosts

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
<source lang="VB">
<source lang="VB">
-
Function IsFormula(Check_Cell As Range)
+
 
-
    IsFormula = Check_Cell.HasFormula
+
Function GetText(CellRef As String)
 +
Dim StringLength As Integer
 +
StringLength = Len(CellRef)
 +
For i = 1 To StringLength
 +
If Not (IsNumeric(Mid(CellRef, i, 1))) Then Result = Result & Mid(CellRef, i, 1)
 +
Next i
 +
GetText = Result
 +
End Function
 +
 
 +
 
 +
Function GetNumeric(CellRef As String)
 +
Dim StringLength As Integer
 +
StringLength = Len(CellRef)
 +
For i = 1 To StringLength
 +
If IsNumeric(Mid(CellRef, i, 1)) Then Result = Result & Mid(CellRef, i, 1)
 +
Next i
 +
GetNumeric = Result
End Function
End Function
</source>
</source>

Revision as of 19:29, 22 February 2019

<source lang="VB">

Function GetText(CellRef As String) Dim StringLength As Integer StringLength = Len(CellRef) For i = 1 To StringLength If Not (IsNumeric(Mid(CellRef, i, 1))) Then Result = Result & Mid(CellRef, i, 1) Next i GetText = Result End Function


Function GetNumeric(CellRef As String) Dim StringLength As Integer StringLength = Len(CellRef) For i = 1 To StringLength If IsNumeric(Mid(CellRef, i, 1)) Then Result = Result & Mid(CellRef, i, 1) Next i GetNumeric = Result End Function </source>

Personal tools
Strangers In Paradise