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

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -