Custom Functions using J.A.D.E. for Excel Web

ksjohnson86

New Member
Joined
Aug 10, 2023
Messages
3
Office Version
  1. 365
Platform
  1. 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
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top