best to use VBA UDF abnd set to range to then carry out routeen ie formual else it will bounce out..
WARNING i love UDF but they are hard to work and painful to maintain, they really can slow a sheet to a crawl, i really LOOVE then what better that = JAcksCool or Jacksmagic to do that task but pitfulls are dreadful...
Button with one formula will bounce out as not very range aimed.. negative i know but true,
barrie Davidson and Dave hawley cover UDF on there site, as do posters on here but not what i call suceeded... worth a look though depebds on your VBA skills