PanzerRanger
New Member
- Joined
- Jan 3, 2018
- Messages
- 20
Hi!
I have write a custom function sista raden means last row:
Public Function SISTARADEN()
Dim a, h As Integer
a = Worksheets("Stl").Cells(Rows.Count, "A").End(xlUp).Row - 1
h = Worksheets("Stl").Cells(Rows.Count, "H").End(xlUp).Row - 1
If a > h Then
SISTARADEN = a
Else: SISTARADEN = h
End If
End Function
It is then used in a formula =IF(SISTARADEN()/30<1;1;ROUNDUP(SISTARADEN()/30;0))
It is use to automatically create pages in another workbook. The problem is, that if I make a full calculations in another workbook this custom formulas, and a few others, similar to this breaks by returning #VALUE !
What have I done wrong?
I have write a custom function sista raden means last row:
Public Function SISTARADEN()
Dim a, h As Integer
a = Worksheets("Stl").Cells(Rows.Count, "A").End(xlUp).Row - 1
h = Worksheets("Stl").Cells(Rows.Count, "H").End(xlUp).Row - 1
If a > h Then
SISTARADEN = a
Else: SISTARADEN = h
End If
End Function
It is then used in a formula =IF(SISTARADEN()/30<1;1;ROUNDUP(SISTARADEN()/30;0))
It is use to automatically create pages in another workbook. The problem is, that if I make a full calculations in another workbook this custom formulas, and a few others, similar to this breaks by returning #VALUE !
What have I done wrong?