Morning all,
Could you please help me out with my code - I'm simply trying to fill down from the cell with a formula (Rng2 in my code) but I'm getting error upon error.
Rng2.AutoFill Destination:=Range("E2:E14"), Type:=xlFillDefault - gives me an error; as does
Rng2.Select
Selection.AutoFill Destination:=Range("E2:E14"), Type:=xlFillDefault
My full code is as below - any help will be greatly appreciated.
Thank you.
Could you please help me out with my code - I'm simply trying to fill down from the cell with a formula (Rng2 in my code) but I'm getting error upon error.
Rng2.AutoFill Destination:=Range("E2:E14"), Type:=xlFillDefault - gives me an error; as does
Rng2.Select
Selection.AutoFill Destination:=Range("E2:E14"), Type:=xlFillDefault
My full code is as below - any help will be greatly appreciated.
Rich (BB code):
Sub Subpanel_tab()
Dim wsDestin As Worksheet
Dim Rng1 As Range
Dim Rng2 As Range
Dim Rng3 As Range
Set wsDestin = Sheets("Subpanel Coverage")
With wsDestin
Set Rng1 = wsDestin.Range("D2")
Set Rng2 = wsDestin.Range("E2")
Set Rng3 = wsDestin.Range("F2")
Rng1.FormulaR1C1 = _
"=LEFT(RC[-3],SEARCH(""_"",RC[-3],SEARCH(""_"",RC[-3])+1)-1)"
Rng2.FormulaR1C1 = _
"=IFERROR(MID(SUBSTITUTE(RC[-4],""_"",""^^"",2),FIND(""^^"",SUBSTITUTE(RC[-4],""_"",""^^"",2))+2,LEN(RC[-4])),""subpanel"")"
Rng2.AutoFill Destination:=Range("E2:E14"), Type:=xlFillDefault
Rng3.FormulaR1C1 = _
"=IFERROR(LEFT(RC[-1],FIND(""_GENE"",RC[-1])-1),RC[-1])"
Rng3.Select
Selection.AutoFill Destination:=Range("F2:F14"), Type:=xlFillDefault
Application.CutCopyMode = False
End With
End Sub
Thank you.
Last edited by a moderator: