I have a Google sheet with a cell (D1) that contains a formula (=TODAY()
) to show the current date. I am trying to create a macro that will simply copy the value of D1 as displayed (e.g., "5/18/2018") instead of the formula and then display that value as an actual date (i.e., "5/18/2018"). When I use Google sheets PASTE SPECIAL (Paste Value Only)
it actually displays the number "43238" instead of "5/18/2018". How do make it paste the actual date instead of the number?
Google-sheets – Copy Date Value and Paste as actual Date not number
copy/pastegoogle sheets
Related Topic
- Google Sheets – Copy and Paste Cell Value While Preserving Hyperlink
- Google-sheets – Google Sheets on PC Copy/paste using “Paste Values” (Crtl+shift+V) appears to work but numbers are not treated as numbers in GRAPHS
- Google-sheets – search/match a date on Google Sheets using Google script and copy a source range to a destination range OFFSET from that date
- Google Sheets – How to Access the Unformatted Date
- Google-sheets – Macro to copy and paste values from multiple cells as text into a Note
- Google-sheets – Count number of rows with a specific MONTH in the date of a specific cell and a Boolean condition in another cell
Best Answer
You would use the text function.
If you have
=today()
in A1, you would use=text(A1,"mm/dd/yyyy")
. (There are multiple formats for 'mm/dd/yyyy' if that's not the format you want.)Alternatively you can pre-format the cell as a date, so pasting the value would automatically be displayed as a date.