ksjohnson86
New Member
- Joined
- Aug 10, 2023
- Messages
- 3
- Office Version
- 365
- Platform
- MacOS
I've been using the following VBA code for two custom functions in Excel Desktop, but I need to find a way to do the same thing in Excel Web. Is there a way to create these sorts of functions within J.A.D.E.? I don't seem to have access to Office Scripts.
My VBA code:
Function CustomCount(rng As Range) As Long
Dim cell As Range
Dim totalCount As Long
Dim parts() As String
Dim i As Long, j As Long
totalCount = 0
For Each cell In rng
parts = Split(cell.Value, "/")
For i = LBound(parts) To UBound(parts)
If IsNumeric(parts(i)) Then
If parts(i) < 21 Or parts(i) > 35 Then
totalCount = totalCount + 1
End If
End If
Next i
Next cell
CustomCount = totalCount
End Function
Function CustomCountSummer(rng As Range) As Long
Dim cell As Range
Dim totalCount As Long
Dim parts() As String
Dim i As Long, j As Long
totalCount = 0
For Each cell In rng
parts = Split(cell.Value, "/")
For i = LBound(parts) To UBound(parts)
If IsNumeric(parts(i)) Then
If parts(i) >= 21 And parts(i) <= 35 Then
totalCount = totalCount + 1
End If
End If
Next i
Next cell
CustomCountSummer = totalCount
End Function
My VBA code:
Function CustomCount(rng As Range) As Long
Dim cell As Range
Dim totalCount As Long
Dim parts() As String
Dim i As Long, j As Long
totalCount = 0
For Each cell In rng
parts = Split(cell.Value, "/")
For i = LBound(parts) To UBound(parts)
If IsNumeric(parts(i)) Then
If parts(i) < 21 Or parts(i) > 35 Then
totalCount = totalCount + 1
End If
End If
Next i
Next cell
CustomCount = totalCount
End Function
Function CustomCountSummer(rng As Range) As Long
Dim cell As Range
Dim totalCount As Long
Dim parts() As String
Dim i As Long, j As Long
totalCount = 0
For Each cell In rng
parts = Split(cell.Value, "/")
For i = LBound(parts) To UBound(parts)
If IsNumeric(parts(i)) Then
If parts(i) >= 21 And parts(i) <= 35 Then
totalCount = totalCount + 1
End If
End If
Next i
Next cell
CustomCountSummer = totalCount
End Function