Functions

  • Thread starter Thread starter fishonspeed
  • Start date Start date
F

fishonspeed

I've made a custom function and I want the value displayed in the cell to
show up as a percentage but don't want to have to togle the % style manually
every time I use it. I've tried everything I can think of to get it to show
up as a percent but get the #VALUE error every time. The Selection.Style =
"Percent" works in macros and whatnot. Does it not work in functions? or is
there some other way you have to do it in functions?
 
No it doesn't, you cannot get a function to set any of the cell attributes.

You could format the value as a percentage and return that, but then it
would be text not a number.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
If it's originally started from a worksheet cell, then your function can't do
it.

No matter how deep you bury it in subroutines and functions, excel still knows
it started on a worksheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top