I have a formula in cell V16 I call in a VBA routine. However, if possible I’d rather just include the formula directly in the VBA code.
Here’s the formula in cell V16 –
Here’s a portion of the VBA code –
I tried this but apparently VBA does not like the direct formula –
1st Test –
2nd Test –
Thanks for viewing,
Steve K.
Here’s the formula in cell V16 –
Rich (BB code):
=ROUNDUP(MAX(PmtNo)/periods_per_year,0)+33
Here’s a portion of the VBA code –
Rich (BB code):
Range("S34:S" & Range("V16").Value).Select
I tried this but apparently VBA does not like the direct formula –
1st Test –
Rich (BB code):
Range("S34:S" & ROUNDUP(MAX(PmtNo)/periods_per_year,0)+33).Select
2nd Test –
Rich (BB code):
Dim EndTotal As String
EndTotal = RoundUp(Max(PmtNo) / periods_per_year, 0) + 33
Range("S34:S" & EndTotal).Select
Thanks for viewing,
Steve K.