Hi,
I have the current code in place which does work but I need it to do something on top of this, I want it to copy the same information all at once M-T but each line from 9 down to 15 only if there is data in column L, so for example below the code I want to copy over all at once lines 9 & 10 only as 11-15 are blank :
ary = Array("Revenue", "Direct Costs", "Overhead", "Fixed Asset", "Current Asset", "Current Liability", _
"Non-Current Liability", "Equity", "VAT", "Tracking", "Accounts Payable", "Unpaid Expense Claims", _
"Bank Revaluations", "Unrealised Currency Gains", "Realised Currency Gains", "Accounts Receivable", _
"Inventory", "Historical", "Rounding", "Retained Earnings")
If Not IsError Then
n = Application.Match(Sheets("Input Sheet").Range("L9").Value, ary, 0)
With Sheets("Chart of Accounts").ListObjects("Table" & n).ListRows.Add.Range 'add a new row and get its Range
.Cells(1).Resize(1, 5).Value = Application.Index(Sheets("Input Sheet").Range("M9:T9").Value, 1, Array(1, 2, 3, 4, 5, 6, 7, 8))
End With
I have the current code in place which does work but I need it to do something on top of this, I want it to copy the same information all at once M-T but each line from 9 down to 15 only if there is data in column L, so for example below the code I want to copy over all at once lines 9 & 10 only as 11-15 are blank :
ary = Array("Revenue", "Direct Costs", "Overhead", "Fixed Asset", "Current Asset", "Current Liability", _
"Non-Current Liability", "Equity", "VAT", "Tracking", "Accounts Payable", "Unpaid Expense Claims", _
"Bank Revaluations", "Unrealised Currency Gains", "Realised Currency Gains", "Accounts Receivable", _
"Inventory", "Historical", "Rounding", "Retained Earnings")
If Not IsError Then
n = Application.Match(Sheets("Input Sheet").Range("L9").Value, ary, 0)
With Sheets("Chart of Accounts").ListObjects("Table" & n).ListRows.Add.Range 'add a new row and get its Range
.Cells(1).Resize(1, 5).Value = Application.Index(Sheets("Input Sheet").Range("M9:T9").Value, 1, Array(1, 2, 3, 4, 5, 6, 7, 8))
End With