I have a Access database that I am getting data from, I added a col right next to the data.I use this col to add some data to it manually. Rows are added to the top of the table and everytime rows are added the manual data col and the Db data get misaligned?
since i am not too techy this is what could come up with
Sub addcells()
x = Worksheets("SaleRates").Range("F:f")
xrows = Application.WorksheetFunction.count(x) + 1
Range("o2") = xrows - Range("O1")
insrow = Range("O2").Value
If Range("O2").Value > 0 Then
Range("Z1:Z" & insrow).Select
Selection.Copy
Range("M2").Select
Selection.Insert Shift:=xlDown
End If
End Sub
I just call this sub using a worksheet_change event in the required worksheet. it does not work because it cant insert cells in table. This works if i resize table and remove the manual col from it but it does nto work when data is modified or deleted