Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
UDF returning #VALUE! why?
=con_check(0,2) == #VALUE!
Function con_check(con_old As Integer, con_now As Integer) Dim i As Integer Dim targ As Integer Dim hit As Integer Dim roll As Integer Dim con_count As Integer con_count = con_now - con_old hit = con_old If con_old < con_now Then For i = 1 To con_count hit = hit + 1 If hit < 3 Then targ = 1 + hit End If If (3 < hit) And (hit < 6) Then targ = hit + 6 End If If hit 5 Then con_check = False Exit Function End If If Application.RoundUp(Rnd() * 6, 0) + Application.RoundUp(Rnd() * 6, 0) targ Then myCell.Value = True Else: con_check = False Exit Function End If Next i Exit Function End If End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Returning Descending Values | Excel Worksheet Functions | |||
LOOKUP returning value in cell above what I was searching for | Excel Discussion (Misc queries) | |||
Returning all values from a lookup - not just the first/last one | Excel Worksheet Functions | |||
MY VLOOKUP IS RETURNING N/A AND THEREFORE MY TOTAL SUM AT THE BOT. | Excel Discussion (Misc queries) | |||
returning a text cell based on a number cell | Excel Worksheet Functions |