How to extract each year in a multiyear date range

SeliM

New Member
Joined
Aug 10, 2023
Messages
31
Office Version
  1. 365
Platform
  1. Windows
Good morning
I have a suite of records with dates over a number of years.
I have the task that includes need to know the years covered by the date range
I have tried to use sumproduct without success
The need is for a formula not vba

Your advice would be most apreciated.
Geoff
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try this:
1718837876655.png
 
Upvote 0
Many thanks
Unfortunately, my data is by columns, so I don't get a lovely unique list like yours.
I get each date converted to year :cautious:
 
Upvote 0
Geoff
Provide a sample that is representative of your data. Then mark up a mocked up solution that matches your sample data. Please use XL2BB
 
Upvote 0
I'm sorry I've never had success with XL2BB
Sample date by row
Date of Audit:17/08/202217/10/202217/02/202417/08/202416/03/202516/08/2027

List of Years
2022
2024
2025
2027

List that adds years if not already in the list
 
Upvote 0
Since your dates appear to be in ascending order, there is no need for the SORT function. Give this a try (adjust the range to match your actual data's location)...
Excel Formula:
=TOCOL(UNIQUE(YEAR(B2:G2),1))
 
Upvote 0
Solution
Wonderful!

It looks so easy when you people provide a response :)

A small thing for some a big step for me
I really appreciate both you knowledge and patience

G
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top