excel - Compare dates yyyy with dd/mm/yyyy -
in excel possible compare year yyyy (say 2016) date dd/mm/yyyy (say 01/01/2015) , find out greater. assumption date in yyyy format first day of year.
so example
2015 v 01/01/2014 return true 2015 v 01/01/2015 return false 2015 v 01/01/2016 return false
i can code in vba user needs in cell in excel spreadsheet.
one option write vba code in function in code module, returns greater value.
public function comparedates(date1 date, date2 date) date 'compare date1 , date2 'comparedates = whichever date greater end function
you can add formula =comparedates(date1, date2)
in cell
Comments
Post a Comment