View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier[_11_] Roger Govier[_11_] is offline
external usenet poster
 
Posts: 18
Default YEAR result from an ArrayFormula, or Query function

On Tuesday, 2 July 2019 04:24:40 UTC+1, wrote:
I have a date in column J [01/01/2019]

I need column AS to show JUST the 2019 Year, and I need (strongly want) a header that says "YEAR". I cant have the formula in the row 2 because of sorting. or can I?

I don't want to drag a formula endlessly down... I would like an arrayFormula or Query solution.

Thank you.


In cell AS2 enter =YEAR(J2)
Hover over the bottom right corner of cell AS2 until you see the "+" fill handle. Double click the fill handle and it will automatically fill the formula down the column for you.

Better still, if you could make the range that contains column As into a table (Insert Table) then anter your formula in As2 and it will automatically populate the other cells in column As, and also add the formula s you add any more rows.