Thanks for the valuable helps.
Bcos some of my data are in simple numeric (eg 2.63) and some are in
percentage numeric form (eg 24.32%), obviuosly I dont want to convert 2.63 to
263.00%.
Question: how can I evaluate in VBA whether a cell is in simple numeric or
percentage numeric form?
zhj23
"JE McGimpsey" wrote:
> One way:
>
> Debug.Print Format(0.2432, "0.00%")
>
> or, in XL
>
> =TEXT(0.2432, "0.00%")
>
> In article <F675F5F4-C229-496E-9DD1-(E-Mail Removed)>,
> zhj23 <(E-Mail Removed)> wrote:
>
> > when a percentage is converted to text, it always gives the decimal form.
> > e.g. 24.32% will become 0.2432. How can I keep "24.32%" in text form? I guess
> > there is a better way to do it in VBA than to first add an apostrophe in the
> > worksheet cell.
> >
> > Many thanks.
> >
> > zhj23
>
|