ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy with NumberFormatLocal included (https://www.excelbanter.com/excel-programming/271875-copy-numberformatlocal-included.html)

Patrick Molloy[_3_]

Copy with NumberFormatLocal included
 
Well what a cell holds as its value and what is displayed
are two separate things.
You can copy / pastespecial
....this allows you to copy the format, formula, values
etc, but this will be based on the cell's value
ultimately. ( no discussion on formuka please, I'm
keeping it low key)
To copy what you see as the is more difficult and I'd
suggest one or two possibililites.
First. use the TEXT() function in a sheet cell.
A1 has the number 123.456 and formats to 123.5
in C1 put = TEXT(A1,"0.0")
This places the 'formatted' number into C1
Second: In code
Range("C1").Value = Format$(Range("A1").Value,"0.0")

HTH
Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
Hello :)

I try to copy a cell to another cell without copying the
NumberFormatLocal information but copy the visible

output of a cell
1:1 into another cell



Example
Cell A1
Value: 1
NumberFomratLocal = "00000000"
Visible Value = 00000001

then I Press COPY/PAST (without NumberFormatLocal)

Cell A2
Value: 00000001
NumberFormatLocal = "@"
Visible Value = 00000001


any suggestions

Thanks

Michi :)
.



All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com