Code to convert numbers with error and general into number and date format

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello everyone,
Whenever I download this data, I come across this problem each time. As the rows with numbers in column C are showing an error, it is difficult to match them be it vlookup or index match functions in the code. The numbers can be in any of the rows like it may be in the first row or in the middle or end.
As the dates in columns E and P are in the general format, I need them to be converted into data format "dd-mm-yyyy".
I need your help to write a code for these 3 columns, so that I can add this code in the beginning of my code so that I do not face the above problem again and again. Please note that the headings are merged.
Thank you in advance.
format cells in 3 columns with a code.xlsx
ABCDEFGHIJKLMNOPQRSTUVWX
1
2
3
4
5127891015GSTR-1/IFF/GSTR-5 Filing Date1718192021222324
6Invoice number4Invoice Date611121314
7BCRS22/14919-04-202211-May-22
8BCRS22/149-Total19-04-202211-May-22
9
105926-04-202211-May-22
1159-Total26-04-202211-May-22
12
13
14667/22-2330-04-202213-May-22
15667/22-23-Total30-04-202213-May-22
16
17
1811030-04-202211-May-22
19110-Total30-04-202211-May-22
20
21AD-5513-04-202211-May-22
22AD-55-Total13-04-202211-May-22
23
24AD-5613-04-202211-May-22
25AD-56-Total13-04-202211-May-22
26
27367/22-2325-04-202210-May-22
28367/22-23-Total25-04-202210-May-22
29
30DSL/2020077530-04-202211-May-22
31DSL/2020077530-04-202211-May-22
32DSL/20200775-Total30-04-202211-May-22
33
3452501-04-202210-May-22
35525-Total01-04-202210-May-22
36
37DCR1522230174114-04-202211-May-22
38DCR15222301741-Total14-04-202211-May-22
39
40DCR1522230373628-04-202211-May-22
41DCR15222303736-Total28-04-202211-May-22
42
4320110294630-04-202211-May-22
44201102946-Total30-04-202211-May-22
45
4620110294730-04-202211-May-22
47201102947-Total30-04-202211-May-22
48
4920110294830-04-202211-May-22
50201102948-Total30-04-202211-May-22
51
5220110294930-04-202211-May-22
5320110294930-04-202211-May-22
54201102949-Total30-04-202211-May-22
55
5620110295030-04-202211-May-22
57201102950-Total30-04-202211-May-22
58
59
60210730-04-202209-May-22
612107-Total30-04-202209-May-22
62
63MM01308-04-202210-May-22
64MM013-Total08-04-202210-May-22
65
66MM01608-04-202210-May-22
67MM016-Total08-04-202210-May-22
68
69657326-04-202210-May-22
706573-Total26-04-202210-May-22
71
72128709-04-202209-May-22
731287-Total09-04-202209-May-22
74
75184420-04-202210-May-22
761844-Total20-04-202210-May-22
77
78PHP2223-1458119330-04-2022
79PHP2223-14581193-Total30-04-2022
B2B


In the xl2BB sheet it is not possible to view the errors in the number so I am sharing the link to the workbook also.
Loading Google Sheets
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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