PDA

View Full Version : Solved: How to copy formatted number cells visible text?



Bendo
06-03-2010, 09:25 PM
Hi all,

Ok I give up on trying to do this so I humbly ask for some help!

I'm trying to get the visible formatted text from a cell.

So for example in cell A1 I have 4.3 and I have the column formatted for two decimal places. So the cell shows up as 4.30 and this is what I want.

I have a very long formula and when it picks up the cell to paste into a web page, the line gets 4.3 rather than 4.30

How do I grab the visible on screen value of the cell rather than the behind the scenes value?

Thanks in advance

Aussiebear
06-03-2010, 11:28 PM
Are you using Paste Special when pasting?

Bendo
06-03-2010, 11:40 PM
Hi Aussiebear,

yes. As simple as this sounds, when paste special is used it pastes the values. It is pasting the value which is 4.3 but not 4.30

Pasting value and number formats pastes 4.30 but when my macro picks up the value it is picking up the underlying value of 4.3 and not 4.30

I want the value that is displayed 4.30 and not the underlying value of 4.3

I can't seem to program vba to get this displayed value :-(

(Later on I'm changing the values to currency in a text format so I need the two digits)

Bendo
06-06-2010, 10:13 PM
Hi all,

any help at all with this one?

Someone has got to have an idea...
I'm still searching forums for some answer...

I know I could do it with a mountain of IF and LEN and RIGHT statements but there has got to be a better way.

Any ideas... anyone?

Thanks,
Bendo

domfootwear
06-06-2010, 11:14 PM
Try this formula

=Text(YourCell,"#,###.00")

Bendo
06-06-2010, 11:16 PM
Thanks all,

Just found Fixed() which did the trick. Have been days trying to find something. I'll try out your suggestion too domfootwear.

Now how do I mark this thread closed... I'm newish here...