Hello All,
i have some data at sheet1 that i use code to divert in different columns at sheet3 and auto fill down to last row if any
however this will come with an error #1004 on below columns IF i have only 1 row data
what should i do to avoid any of this case?
thank you very much for your help
i have some data at sheet1 that i use code to divert in different columns at sheet3 and auto fill down to last row if any
however this will come with an error #1004 on below columns IF i have only 1 row data
what should i do to avoid any of this case?
VBA Code:
Sheets("Sheet3").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]+2"
Selection.AutoFill Destination:=Range("B2:B" & Range("F" & Rows.Count).End(xlUp).Row)
Range("D2").Select
ActiveCell.FormulaR1C1 = "987654"
Selection.AutoFill Destination:=Range("D2:D" & Range("F" & Rows.Count).End(xlUp).Row)
Range("E2").Select
ActiveCell.FormulaR1C1 = "Japan"
Selection.AutoFill Destination:=Range("E2:E" & Range("F" & Rows.Count).End(xlUp).Row)
Range("G2").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(Sheet2!RC[12],"" "",Sheet2!RC[11])"
Selection.AutoFill Destination:=Range("G2:G" & Range("F" & Rows.Count).End(xlUp).Row)
thank you very much for your help