ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   YEAR result from an ArrayFormula, or Query function (https://www.excelbanter.com/excel-worksheet-functions/454348-year-result-arrayformula-query-function.html)

[email protected]

YEAR result from an ArrayFormula, or Query function
 
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.

Roger Govier[_11_]

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.


All times are GMT +1. The time now is 09:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com