Benjamin Hirt
Benjamin Hirt

Reputation: 1

Paste the displayed value of a cell in Excel

I would like to know if there is a way either with excel formulas or VBA to paste the displayed value of a cell and not the actual value of a cell. For example, let's say the value of cell A1 is 945.66, it could be eventually displayed as 946 if one removes the display of the decimals. I'd like to paste the displayed value of 946 in another cell, say A2. The paste special method "pastevalueandnumberformat" indeed displays the value 946 in the cell A2 but the actual value of the cell is 945.66.

I can't use the round function as I want to check what is actually displayed and run some calculation with the displayed value and not the actual value

Thanks for your help!

Upvotes: 0

Views: 2036

Answers (1)

Tim Nevins
Tim Nevins

Reputation: 341

Use "Precision as Displayed" functionality....

Format all your cells as you want them to be shown. Click the file tab , and then click Options. Click Advanced, and then under When calculating this workbook, select the Set precision as displayed check box, and then click OK. Click OK.

In my opinion, you should used this feature carefully. You'll get a warning when you set this. It is set on a workbook basis, so all worksheets in the workbook will be affected.

I've never actually used this feature other than playing around with it, so best of luck!

Upvotes: 0

Related Questions