Excel formats rows differently and changes format

Brutusar

Board Regular
Joined
Nov 23, 2019
Messages
166
Office Version
  1. 365
Platform
  1. Windows
Hi, I have a strange problem,

After scraping some data from a website and stored it into a data table, it is written into Excel. This is usually 10-15 rows. In the data table, one column is dates in the format dd/mm/yyyy. When this data is written into Excel, some cells are being formatted as "General", and some as "Date". (This is happening "by itself" when the data are written in). Then in some cells, formatted as "Date", day and month switches places. For example, 11/04/2020 suddenly becomes 04/11/2020. This seems to happen completely by random.

Does anyone have an idea why this is happening?
 

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.
Hi Brutusar,

I have encountered a similar issue before when I exported one report from a system into excel. The system was generating the report in US date format mm/dd/yy whereas the date format we use in Kuwait is dd/mm/yy. I believe you could solve it by either changing the date format in your windows regional setting or I used a formula to convert my dates to the correct format like below

Book1
AB
1System DateFormula
205/31/2031-May-20
305-12-2012-May-20
405/20/2020-May-20
505/13/2013-May-20
605-07-2007-May-20
Sheet1
Cell Formulas
RangeFormula
B2:B6B2=IF(ISNUMBER(A2),DATE(YEAR(A2),DAY(A2),MONTH(A2)),DATE(RIGHT(A2,2)+2000,LEFT(A2,2),MID(A2,4,2)))
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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