1.I have the following code that i created but i'm getting an error on the WS.range line , i''m copying the date from column C to D and then i want the Column D date to be formatted to "YYYY" but I'm getting a "Run time error" .

2. I want to use the following array formula on Cell "P2" and copy all the way down to lastrow , using column "C" as reference. but when i tried to use the formula it didn't work.

VBA Code:

```
Sub APsummaries()
Dim WS As Worksheet
Set WS = ActiveSheet
ActiveSheet.Select
Range("C:C").Copy
Range("D:D").Insert
Range("D1").Value = "Year"
WS.Range("D:D") = Application.WorksheetFunction.Text(WS.Range("D:D"), "yyyy")
Columns("H").NumberFormat = "General"
Range("N1").Value = "Top 10"
Range("O1").Value = "Aging per Inv"
Range("P1").Value = "Aging Bucket per Inv"
Range("Q1").Value = "BU"
Range("O2").Formula = "=DAYS(TODAY(), C2)"
Range("P2"),Formula = "=IF(O2>90,"91 and Over",IF(O2>60,"61-90 days",IF(O2>30,"31-60 days",IF(O2<0,"Future Due","Current Period"))))"
Range("Q2").Formula = "=VLOOKUP(X2,'[Adaptive Level Hierarchy by Geoff 8.21.20_WA.xlsx]Sheet2'!$A$2:$B$300,2,0)"
End Sub
```

Thank you in advance for your expertise and assistance. let me know if you have any questions.