VBA excel function to Javascript

I am trying to convert a VBA function from excel into a Google Sheets function. I have no experience in Javascript and am lost at the moment. I have Any help is appreciated.

Here is the script:

Function GetMinName() As String

Dim dataRange As Range
Dim minValue As Double
Dim minValueCell As Range

' Define the data range
Set dataRange = Worksheets("100M").Range("B2:D5")
' Find the minimum value in the data range
minValue = WorksheetFunction.min(dataRange)
' Find the first cell containing minimum value
Set minValueCell = dataRange.Find(minValue, LookIn:=xlValues)

' Return the name in col 1 of the row containing the min value.
GetMinName = Worksheets("100M").Cells(minValueCell.Row, 1)

End Function

Google Sheets is something that tends to be outside of what we deal with here.

I can recommend though a place that specializes in Google Scripts, which is:


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.