Dates Not Copying Correctly

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,557
Office Version
  1. 365
Platform
  1. Windows
I am copying dates from an external database to Excel in column A. When I do, dates appear in the format of "mm/dd/yy" (so today shows as 01/28/24). If B2 = today's date and I run the IF statement that says =B2=A2, the return is FALSE even though both A2 and B2 have 01/28/24 in the cells. When I manually type 01/28/24 in A2, all of a sudden B2 returns TRUE.

Why is this happening and how can I fix without re-typing all the dates in column A?
 
Was trying to avoid using macros as my client firewall blocks them. I will try it on home PC if this is only option to make the dates appear normal.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
As I stated Fluffs's method can be done easily manually with a selection and a few clicks.
I would only use it in a macro if it was part of a larger macro (and I use virtually the same method to convert a column of text numbers to real numbers in a report pulled off our system every 2 hours)
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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