This formula checks if the year in column A of Sheet2 is the same as the year in column B of Sheet2. If they are the same, the formula returns that year. If they are different, the formula returns the range of years in the format of 'start year-end year'.

For example, if cell A1 in Sheet2 contains '01/01/2020' and cell B1 contains '12/31/2021', the formula would return '2020-2021'. If cell A1 and B1 both contain '01/01/2020', the formula would return '2020'.

Excel Formula: Extract Year Range from Two Dates in Different Columns

原文地址: https://www.cveoy.top/t/topic/nKpz 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录