=IFYEARSheet2!AA=YEARSheet2!BBYEARSheet2!AAYEARSheet2!Sheet2!AA&-&YEARSheet2!Sheet2!BB
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".
原文地址: http://www.cveoy.top/t/topic/dHCs 著作权归作者所有。请勿转载和采集!