ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replacing (https://www.excelbanter.com/excel-programming/354735-replacing.html)

Ozgur Pars[_2_]

Replacing
 
Hello,
I am replacing the "."(dots) of a date which comes from the system(
example:28.02.2006) with "/" so that my excel does recognize it as a date.

I used to do manualy until recently. When I tried to automate it with VBA I
saw that it is not recognized as a date. When you select the cell and place
your cursor on the fomula line and hit enter it is recognized.
I tried to record a macro and use the code but it generates a code like this
which is not much use to me I guess(since the dates will change):
ActiveCell.FormulaR1C1 = "2/28/2006"

I know it is probably a stupid question but some hwlp would be greatly
appreciated.

Thanks a lot,
Ozgur


Bob Phillips[_6_]

Replacing
 
Try

ActiveCell.Value = ActiveCell.Value


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hello,
I am replacing the "."(dots) of a date which comes from the system(
example:28.02.2006) with "/" so that my excel does recognize it as a date.

I used to do manualy until recently. When I tried to automate it with VBA

I
saw that it is not recognized as a date. When you select the cell and

place
your cursor on the fomula line and hit enter it is recognized.
I tried to record a macro and use the code but it generates a code like

this
which is not much use to me I guess(since the dates will change):
ActiveCell.FormulaR1C1 = "2/28/2006"

I know it is probably a stupid question but some hwlp would be greatly
appreciated.

Thanks a lot,
Ozgur




Ozgur Pars[_2_]

Replacing
 
Hi Bob thanks for your reply but it did not work.

Ozgur

"Bob Phillips" wrote:

Try

ActiveCell.Value = ActiveCell.Value


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ozgur Pars" wrote in message
...
Hello,
I am replacing the "."(dots) of a date which comes from the system(
example:28.02.2006) with "/" so that my excel does recognize it as a date.

I used to do manualy until recently. When I tried to automate it with VBA

I
saw that it is not recognized as a date. When you select the cell and

place
your cursor on the fomula line and hit enter it is recognized.
I tried to record a macro and use the code but it generates a code like

this
which is not much use to me I guess(since the dates will change):
ActiveCell.FormulaR1C1 = "2/28/2006"

I know it is probably a stupid question but some hwlp would be greatly
appreciated.

Thanks a lot,
Ozgur






All times are GMT +1. The time now is 01:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com