Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith
 
Posts: n/a
Default Curious operation of Paste

I have a spreadsheet with a column of numbers. The numbers actually represent a
percentage, but they're stored as a number (eg, 5.6, not .056).

Rather than divide all the numbers by 100, I decided to get cute and applied a
custom format of #,##0.0"%". Visually, it looked great.

In my macro, I filter the data, copy the visible cells and paste to a new
spreadsheet, planning on dividing by 100 every time I used data from this
column. Guess what happens? Paste actually changes the data to a real
percentage. 5.6 from the original cell is changed to .056, with a format of
#,##0.0%!

More of the story: don't use custom formats to display percentages. Store your
data properly and use a percentage format.

--
Regards,
Fred



  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Curious operation of Paste

I just tried this in xl2003.

The value pasted fine (no change)--both manually and via code. But the format
was pasted, too--so it still looked like a percentage.

You may want to try paste|special|values to see if that helps you.



Fred Smith wrote:

I have a spreadsheet with a column of numbers. The numbers actually represent a
percentage, but they're stored as a number (eg, 5.6, not .056).

Rather than divide all the numbers by 100, I decided to get cute and applied a
custom format of #,##0.0"%". Visually, it looked great.

In my macro, I filter the data, copy the visible cells and paste to a new
spreadsheet, planning on dividing by 100 every time I used data from this
column. Guess what happens? Paste actually changes the data to a real
percentage. 5.6 from the original cell is changed to .056, with a format of
#,##0.0%!

More of the story: don't use custom formats to display percentages. Store your
data properly and use a percentage format.

--
Regards,
Fred


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Paste Special and Linking ajkim001 Excel Discussion (Misc queries) 8 March 14th 06 02:10 PM
Paste Special Problem ajkim001 Excel Discussion (Misc queries) 1 March 10th 06 11:50 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"