Date not showing after paste

konficus

New Member
Joined
Dec 14, 2015
Messages
21
I have a report file, in some section i am copying a table from a remote computer into local excel file, but after copy date's are not like date, i need to search & replace everytime ( search "." replace with "." )then dates comes. I have a vba code but not correcting in all sheets.


PHP:
Sub tarihecevir()    Dim sht As Worksheet
    Dim fnd As Variant
    Dim rplc As Variant

    fnd = "."
    rplc = "."

    For Each sht In ActiveWorkbook.Worksheets
        sht.Cells.Replace what:=fnd, Replacement:=rplc, _
                          LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
                          SearchFormat:=False, ReplaceFormat:=False
    Next sht End Sub

It works with normal ctrl+H but macro doesnt fix it. Please help me.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I'm not familiar with periods ( "." ) in dates. What format are you dates actually in here? Can you use a standard date format instead ( such as 01/01/2018 )?
 
Upvote 0
I'm not familiar with periods ( "." ) in dates. What format are you dates actually in here? Can you use a standard date format instead ( such as 01/01/2018 )?

In our country date format is like 01.01.2018 and the file i get also 01.01.2018 but after copy/paste it shows 01.01.2018 but excel formulas doesnt recognize as date, and i am doing find&replace. after that formulas sees it.
 
Upvote 0
I suppose you should make sure that your cells here aren't formatted as Text. That could also cause this problem.
I can't test - don't use that date format here.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
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