I am working on reserving and need to bootstrap the total pseudo cumulative claims arising from the actual incremental claims data. I want to bootstra

Conoro1894

New Member
Joined
Nov 7, 2016
Messages
9
I can do this question for any given triangle/matrix. I need to be able to simplify the process of translating this to a general triangle. In other words,I want to be sub ib the new data and get the results.

This is what I've got so far:
Code:
Sub Boot()
Dim x As Range
For Each x In Range("B:B")
If x.Value = "" Then
x.Select
RowCount = ActiveCell.Row
MsgBox (RowCount)
Exit For
End If
Next x
End Sub

Dim i As Integer
Dim j As Integer

For i = 1 To RowCount
For j = 2 To RowCount
If i = 1 Then
Selection.Cells(RowCount + 2, 1).Value = "Cij"
Selection.Cells(RowCount + 2, j).Value = Selection.Cells(1, j)
Selection.Cells(RowCount * 2 + 3, 1).Value = "IDF"
Selection.Cells(RowCount * 2 + 4, 1).Value = "CDF"
Selection.Cells(RowCount * 2 + 5, 1).Value = "% Dev"
Selection.Cells(RowCount * 2 + 7, 1).Value = "D'ij"
Selection.Cells(RowCount * 2 + 7, j).Value = Selection.Cells(1, j)
Selection.Cells(RowCount * 3 + 9, 1).Value = "C'ij"
Selection.Cells(RowCount * 3 + 9, j).Value = Selection.Cells(1, j)
Selection.Cells(RowCount * 4 + 11, 1).Value = "Rij"
Selection.Cells(RowCount * 4 + 11, j).Value = Selection.Cells(1, j)
Selection.Cells(RowCount * 5 + 13, 1).Value = "R*ij"
Selection.Cells(RowCount * 5 + 13, j).Value = SelectionCells(1, j)
Selection.Cells(RowCount * 6 + 15, 1).Value = "C*ij"
Selection.Cells(RowCount * 6 + 15, j).Value = Selection.Cells(1, j)
Selection.Cells(RowCount * 7 + 17, 1).Value = "D*ij"
Selection.Cells(RowCount * 7 + 17, j).Value = SelectionCells(1, j)
Selection.Cells(RowCount * 7 + 19, 1).Value = "IDFs"
Selection.Cells(RowCount * 7 + 20, 1).Value = "CDFs"

Else
Selection.Cells(i + RowCount + 1, 1).Value = Selection.Cells(i, 1)
Selection.Cells(i + RowCount + 1, j).FormulaR1C1 = " = If(IsBlank(R[" & -(RowCount + 1) & "]C1)),"""",(Sum(R[" & -(RowCount + 1) & "]C1)):RC[-1]"
 
Last edited by a moderator:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Cross-posted: I need to write a general VBA program that will bootstrap any given size development triangle.

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule #13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
I put a link up on the other site but couldn't find an edit button here.
You only have 10 minutes to edit your post. After that point, you would need to post a reply back to it.
Be sure to read the other forum rules contained in the link I sent.
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,831
Members
449,471
Latest member
lachbee

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