Skip to main content

Posts

Showing posts with the label set parent child sheet distribution in excel

set parent child sheet distribution,Generating DropDown control in excel

Set parent child sheet distribution in excel If you want to set excel worksheet as per parent and child sheet then you can try this example. This is simple example to set parent child sheet distribution in excel. Sub Distribution(ByVal destflnm As String, ByVal srcflnm As String, ByVal ParentColumn As String, ByVal ChildColumn As String) 'Clear Destination Sheet Dim RgClear As Range Set RgClear = Worksheets(destflnm).Range("$A$1:$" & LastCol(destflnm) & "$" & LastRow(destflnm)) RgClear.Clear 'Set Parent Range Dim RgParent As Range Set RgParent = Worksheets(srcflnm).Range(ColumnRange(srcflnm, ParentColumn)) 'Set Child Range Dim RgChild As Range Set RgChild = Worksheets(srcflnm).Range(ColumnRange(srcflnm, ChildColumn)) 'Set Search Count Dim i As Integer i = RgParent.Count 'Set Column index for Destination Sheet Dim ci As Integer ci = 1 'Set row index for Destination Sheet ...