-
Format gets lost
Hi, I want to copy the value of a cell from one sheet to another.
However when I do this, it changes the cell format from Accounting Format to Currency Format.
Any idea how to stop this from happening?
Line of code is
[VBA]Dim RFC as Worksheet
Dim Data as Worksheet
Set RFC = Worksheets("RFC")
Set Data = Worksheets("Data")
RFC.Cells(Row, Col).Value = Data.Cells(Row, Col).Value
[/VBA]
I see there is a FormatCurrency command, but could not find a FormatAccounting command.
I realise that I could just change the format back afterwards, but if I am doing this for a number of lines then it gets time consuming
Thanks
-
try[VBA]Data.Cells(Row, Col).copy RFC.Cells(Row, Col)[/VBA]but is there a formula you want to lose while copying?
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules