I use a spreadsheet to track (and verify) my electricity usage and billing. I have a smart meter and can access the database that is updated on weekdays; so I can see usage as it accretes and project what charges will be for the billing period.
I've noticed that when I copy data from the database and paste it into my spreadsheet, that the cell formatting from the database results rather than the formatting I'd prefer. I want to see KWH to 3 decimal points.
Is there a way to preserve my column formatting while copying data into those columns?
Cell Formats
-
- UraniumLounger
- Posts: 9295
- Joined: 13 Feb 2010, 01:27
- Location: Deep in the Heart of Texas
Cell Formats
Bob's yer Uncle
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs
(1/2)(1+√5) |
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Cell Formats
Copy the data in the database.
Select the (first) target cell.
Click the lower half of the Paste button on the Home tab of the ribbon.
Select 'Match Destination Formatting' or press M.
Select the (first) target cell.
Click the lower half of the Paste button on the Home tab of the ribbon.
Select 'Match Destination Formatting' or press M.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12615
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Cell Formats
Alternatively you can right click the target cell and use Paste Values to paste just the value of the copied data, and not the formatting.
You do not have the required permissions to view the files attached to this post.
StuartR
-
- UraniumLounger
- Posts: 9295
- Joined: 13 Feb 2010, 01:27
- Location: Deep in the Heart of Texas
Re: Cell Formats
I knew there had to be an answer.
Thank you, Gentlemen!!!
Thank you, Gentlemen!!!
Bob's yer Uncle
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs
(1/2)(1+√5) |
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Cell Formats
@StuartR: the options in your screenshot are available when you copy/paste within Excel. If the clipboard contains external data (from a database for example), the options are as shown in my screenshot.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12615
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
-
- 4StarLounger
- Posts: 563
- Joined: 27 Jun 2021, 10:46
Re: Cell Formats
>the options are as shown in my screenshot
To be fair, that really rather depends on what formats the source application makes available on the clipboard
To be fair, that really rather depends on what formats the source application makes available on the clipboard
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands