Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default .value only to 2 dp?


Hi,

I have some cells in my worksheet that are numbers to 4 dp. I'm copying
them to other cells using

Me.Cells(3, 2).Value = Me.Cells(4, 2).Value

However the resultant values in the new cells are only to 2 dp (and I
get rounding errors), when the column has been set to always be 4dp.

Anyone have any idea as to a solution? Thanks, Daz


--
dazman
------------------------------------------------------------------------
dazman's Profile: http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=495438

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default .value only to 2 dp?

Dazman,
Works OK for me - are you sure you don't reformat the
cell(s)? And the number will work to 4 dp even if only 2 are displayed so I
don't understand the rounding problem.


"dazman" wrote:


Hi,

I have some cells in my worksheet that are numbers to 4 dp. I'm copying
them to other cells using

Me.Cells(3, 2).Value = Me.Cells(4, 2).Value

However the resultant values in the new cells are only to 2 dp (and I
get rounding errors), when the column has been set to always be 4dp.

Anyone have any idea as to a solution? Thanks, Daz


--
dazman
------------------------------------------------------------------------
dazman's Profile: http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=495438


  #3   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default .value only to 2 dp?

You will get this situation if the destination cell is already formatted to
2dp. Copying the values in this way will not change the formatting.
Try this:

Me.Cells(3, 2).Value = Me.Cells(4, 2).Value
Me.Cells(3, 2).NumberFormat = Me.Cells(4, 2).NumberFormat

--
Ian
--
"dazman" wrote in
message ...

Hi,

I have some cells in my worksheet that are numbers to 4 dp. I'm copying
them to other cells using

Me.Cells(3, 2).Value = Me.Cells(4, 2).Value

However the resultant values in the new cells are only to 2 dp (and I
get rounding errors), when the column has been set to always be 4dp.

Anyone have any idea as to a solution? Thanks, Daz


--
dazman
------------------------------------------------------------------------
dazman's Profile:
http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=495438



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



All times are GMT +1. The time now is 07:54 PM.

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

About Us

"It's about Microsoft Excel"