Copy date

noraa

New Member
Joined
Mar 16, 2023
Messages
20
Office Version
  1. 2019
Platform
  1. Windows
Hello I have a cell on Seet "Order List" B3 that has a formula to create a date I need to copy that date to Sheet "Fill" C3 when I run my code it fills in with a number instead of date column b on sheet fill is set to short date

Sub CopyDate()
Sheets("Fill").range("C3").Value = Sheets("Order list").range("B3").Value
End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If the number is like 45593 you just need to format the cell as a valid Date format for your regional settings, you'll find that cell is formatted as General or Number
 
Last edited:
Upvote 0
Thank you for the response. I do have column C3 and Column B3 formatted as a short date. It still returns the number and not the date.
 
Upvote 0
Can you check the actual cell please and also tell us what =ISNUMBER(C3) returns on your Fill sheet
 
Upvote 0
On "Order list" B3 it is pulling in a date from "Order" G6 the formula that shows in "order list" B3 is =Order!G6. It displays the date mm/dd/yyyy. When i use the code originally posted I get the number 45589 in "fill" C3.
 
Upvote 0
Please do what was requested in my last post please
 
Upvote 0
You don't add it to the code, you put it in an empty cell on the sheet, it is a regular formula.
I still need you to check the formatting on C3, I e. Right click the cell, Format cells and check if it is actually showing as a date format despite what you have formatted the column as
 
Upvote 0
I checked the cell it is formatted to short date. I put =ISNUMBER in cell D13 on sheets fill when I hit enter cell C3 Highlights but does not return anything in D13. in the formula bar it does display a date just not in the cell
 
Upvote 0
=ISNUMBER in cell D13 on sheets fill when I hit enter cell C3 Highlights but does not return anything in D13
That doesn't make any sense to me if it had a real date or number it would return TRUE, if it had text that looks like a number it would return FALSE, if C3 was empty it return a FALSE

Book1
CDEF
345589TRUEReal number
424/10/2024TRUEReal number formatted as date
545589FALSEText number
624/10/2024FALSEText date
7FALSEempty cell
Fill
Cell Formulas
RangeFormula
D3:D7D3=ISNUMBER(C3)


Do you have any other VBA code? Sheet protection? and is your calculation set to Automatic?
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top