Eomonth in Excel -


how can use function in user defined function ? cannot reference cell.

function sonxmonth()    sonxmonth = eomonth(a1,0) + 1 end func 

you need use worksheetfunction used container microsoft excel worksheet functions can called visual basic.

function sonxmonth() sonxmonth = worksheetfunction.eomonth(range("a1"), 0) end func


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -