Hi,
I have written
that calculates nicely the stoping time based on amoung of lines (Rng.Row) times an interval in minutes found in Range("RngMin").
If I write
instead of
in a cell, I got the exact same value but if I replace
by StopTime(B10) in a formula with ifs, I have an error.
I guess it has something to do with the function being as String?
In addition, can someone confirm that the UDF will allways use D10 and rng fromits own sheet even if I copy the sheet multiple times?
Thank you in advance for any hint....
<strike></strike>
I have written
Code:
Function StopTime(Rng As Range) As String
StopTime = Format(Range("D10") + TimeValue("00:0" & Range("RngMin")) * (Rng.Row - 9), "hh:mm")
End Function
that calculates nicely the stoping time based on amoung of lines (Rng.Row) times an interval in minutes found in Range("RngMin").
If I write
Code:
[LEFT][COLOR=#222222][FONT=Verdana]=StopTime(B10)[/FONT][/COLOR][/LEFT]
Code:
=$D$10+TIME(,RngMin*(ROW(F10)-9),)
Code:
[LEFT][COLOR=#222222][FONT=Verdana]$D$10+TIME(,RngMin*(ROW(F10)-9),)[/FONT][/COLOR][/LEFT]
I guess it has something to do with the function being as String?
In addition, can someone confirm that the UDF will allways use D10 and rng fromits own sheet even if I copy the sheet multiple times?
Thank you in advance for any hint....
Last edited: