Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Paste Special and Linking | Excel Discussion (Misc queries) | |||
Paste Special Problem | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |