A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Excel turning percentages into scientific notation



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2010, 02:14 PM posted to microsoft.public.excel.misc
mr-tom[_2_]
external usenet poster
 
Posts: 36
Default Excel turning percentages into scientific notation

Hi,

We've got a batch programme that created a few hundred reports (person
specific numbers in same layout).

All it does is take numbers from a table and paste special values into the
various locations in the template.

Some of the rules about how it does this are involved, and I'd not be
allowed to post the code, but believe me, that's all it's doing.

Now here's my problem.

It is picking up percentages from the source table and dropping them into
the destination template. Both the source and destination cells are
formatted as percentages.

For some reason, about a third of the time, excel seems to decide that
despite the source and destination both being percentages, it's going to turn
the numbers into scientific notation.

No, there's no "E"s anywhere in the number string.

Anybody encountered anything like this before or know how to stop this?

Cheers,

Tom.
Ads
  #2  
Old June 2nd, 2010, 08:56 PM posted to microsoft.public.excel.misc
Luke M[_4_]
external usenet poster
 
Posts: 451
Default Excel turning percentages into scientific notation

Perhaps add a last line of code the reads:

Cells.NumberFormat = "0.00%"

--
Best Regards,

Luke M
"mr-tom" wrote in message
...
Hi,

We've got a batch programme that created a few hundred reports (person
specific numbers in same layout).

All it does is take numbers from a table and paste special values into the
various locations in the template.

Some of the rules about how it does this are involved, and I'd not be
allowed to post the code, but believe me, that's all it's doing.

Now here's my problem.

It is picking up percentages from the source table and dropping them into
the destination template. Both the source and destination cells are
formatted as percentages.

For some reason, about a third of the time, excel seems to decide that
despite the source and destination both being percentages, it's going to
turn
the numbers into scientific notation.

No, there's no "E"s anywhere in the number string.

Anybody encountered anything like this before or know how to stop this?

Cheers,

Tom.



  #3  
Old June 3rd, 2010, 08:51 AM posted to microsoft.public.excel.misc
mr-tom[_2_]
external usenet poster
 
Posts: 36
Default Excel turning percentages into scientific notation

Thanks, Luke.

Unfortunately the code is iterative - it copies across a vast number of
cells and only a small portion are percentages. It would be a major rewrite
to divide the programme into a percentage component and an "everything else"
component in order to add this line.

But genuinely thanks - if our system didn't cover such a range of stuff, it
would have been a good fix.

"Luke M" wrote:

Perhaps add a last line of code the reads:

Cells.NumberFormat = "0.00%"

--
Best Regards,

Luke M
"mr-tom" wrote in message
...
Hi,

We've got a batch programme that created a few hundred reports (person
specific numbers in same layout).

All it does is take numbers from a table and paste special values into the
various locations in the template.

Some of the rules about how it does this are involved, and I'd not be
allowed to post the code, but believe me, that's all it's doing.

Now here's my problem.

It is picking up percentages from the source table and dropping them into
the destination template. Both the source and destination cells are
formatted as percentages.

For some reason, about a third of the time, excel seems to decide that
despite the source and destination both being percentages, it's going to
turn
the numbers into scientific notation.

No, there's no "E"s anywhere in the number string.

Anybody encountered anything like this before or know how to stop this?

Cheers,

Tom.



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 OfficeFrustration.
The comments are property of their posters.