Public Function Parameters Explication

Arvipor

New Member
Joined
Feb 20, 2014
Messages
3
Hello fellow members of this forum, this is my first time posting a question, but I've been a constant reader of your posts.

I'm currently working on a Min function with a conditional, if you want to check the code it works like a charm... but my problem comes when I try to make it look more professional...


PHP:
Function MinCond(cnd As Variant, X As Range, Y As Range) As Double
Dim nX As Long
Dim nY As Long
Dim i As Integer
Dim min As Double

nX = UBound(X(), 1)
nY = UBound(Y(), 1)

If nX <> nY Then

MsgBox "Los dos rangos deben ser iguales", vbCritical, "No seas pendejo, pendejo!"
  GoTo error
End If
Do Until X(j, 1) = cnd
j = j + 1
Loop
min = Y(j, 1)
For i = 1 To nX

If min > Y(i, 1) And X(i, 1) = cnd Then
min = Y(i, 1)End If
Next

MinCond = min
error:End Function


If you work with a normal Excel Function you can see a description of the formula...
m1.png

following the name of the parameters listed...
m2.png

but when it comes to the public function I created...
m3.png

nor the name of the parameters...
m4.png


Do you guys know a way to describe a Public function and/or its parameters?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Well this would be helpfull, it's a shame though that Excel desn't have this kind of feature.

Anyway, thank you a lot for your help. :biggrin:
 
Upvote 0
But if you press Ctrl+A immediately after the opening paren, you'll see a list of arguments.
 
Upvote 0

Forum statistics

Threads
1,216,118
Messages
6,128,939
Members
449,480
Latest member
yesitisasport

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