PDA

View Full Version : [SOLVED] If Formula with Year Function



sg2209
12-27-2018, 08:17 AM
hi Friends,

i am struggling with the below formula not sure why not getting the results

i need if Cell C2 has a date then year would populate in A2 else blank i have tried the below formula

=IF(C2=""," ","=YEAR(C2))")i am getting = Year(C2))") in results, Kindly help me with this

Moragtao
12-27-2018, 08:49 AM
Use this instead:

=IF(C2=""," ", YEAR(C2))

sg2209
12-27-2018, 08:54 AM
thank you so much
and what of i need to use this same as function via vba