How to code the macro?

E

Eric

Does anyone have any suggestions on how to code the macro?
There is text in cell A1 22-Aug-2002, which is not belong to date format
until I press F2 and enter, then it will change to 22-Aug-02.
I have a table from A1 to Z5000, does anyone have any suggestions on how to
create a macro to perform this task within this range?
Thanks in advance for any suggestions
Eric
 
M

macropod

hi Eric,

You don't need a macro:
1. enter the number '1' into any empty cell
2. copy the '1'
3. select the date range and choose Edit|Paste Special > Values > Add > OK
4. if necessary, reformat the cells with the appropriate date format.
 
O

OssieMac

Macropod,

I think you mean Paste Special -> Multiply (Not add).


--
Regards,

OssieMac


macropod said:
hi Eric,

You don't need a macro:
1. enter the number '1' into any empty cell
2. copy the '1'
3. select the date range and choose Edit|Paste Special > Values > Add > OK
4. if necessary, reformat the cells with the appropriate date format.

--
Cheers
macropod
[Microsoft MVP - Word]


Eric said:
Does anyone have any suggestions on how to code the macro?
There is text in cell A1 22-Aug-2002, which is not belong to date format
until I press F2 and enter, then it will change to 22-Aug-02.
I have a table from A1 to Z5000, does anyone have any suggestions on how to
create a macro to perform this task within this range?
Thanks in advance for any suggestions
Eric
.
 
B

Bob Phillips

Try Data>Text To Columns. Step 3 has a date formatting option.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
E

Eric

Multiply will change the date value, which is not what I want.
I have tried Press F2 and Press Enter on each cell, which is only working
approach.
Do you have any suggestions?
Thank everyone very much for any suggestions
Eric

OssieMac said:
Macropod,

I think you mean Paste Special -> Multiply (Not add).


--
Regards,

OssieMac


macropod said:
hi Eric,

You don't need a macro:
1. enter the number '1' into any empty cell
2. copy the '1'
3. select the date range and choose Edit|Paste Special > Values > Add > OK
4. if necessary, reformat the cells with the appropriate date format.

--
Cheers
macropod
[Microsoft MVP - Word]


Eric said:
Does anyone have any suggestions on how to code the macro?
There is text in cell A1 22-Aug-2002, which is not belong to date format
until I press F2 and enter, then it will change to 22-Aug-02.
I have a table from A1 to Z5000, does anyone have any suggestions on how to
create a macro to perform this task within this range?
Thanks in advance for any suggestions
Eric
.
 
O

OssieMac

Eric,


Any numeric value multiplied by 1 does not change its value. If by pressing
F2 then Enter fixes the problem on on individual cells then it appears that
you have already formatted the column to dates. Therefore if you type 1 into
any empty cell, copy that cell then select all of the existing dates and
Paste Special -> Multiply then it will fix your problem.

If you are nervous about doing it then try Past Special -> Multiply to just
one of the cells and see what it does.

--
Regards,

OssieMac


Eric said:
Multiply will change the date value, which is not what I want.
I have tried Press F2 and Press Enter on each cell, which is only working
approach.
Do you have any suggestions?
Thank everyone very much for any suggestions
Eric

OssieMac said:
Macropod,

I think you mean Paste Special -> Multiply (Not add).


--
Regards,

OssieMac


macropod said:
hi Eric,

You don't need a macro:
1. enter the number '1' into any empty cell
2. copy the '1'
3. select the date range and choose Edit|Paste Special > Values > Add > OK
4. if necessary, reformat the cells with the appropriate date format.

--
Cheers
macropod
[Microsoft MVP - Word]


Does anyone have any suggestions on how to code the macro?
There is text in cell A1 22-Aug-2002, which is not belong to date format
until I press F2 and enter, then it will change to 22-Aug-02.
I have a table from A1 to Z5000, does anyone have any suggestions on how to
create a macro to perform this task within this range?
Thanks in advance for any suggestions
Eric

.
 
E

Eric

I get it, and it works now.
Thank everyone very much for suggestions
Eric

OssieMac said:
Eric,


Any numeric value multiplied by 1 does not change its value. If by pressing
F2 then Enter fixes the problem on on individual cells then it appears that
you have already formatted the column to dates. Therefore if you type 1 into
any empty cell, copy that cell then select all of the existing dates and
Paste Special -> Multiply then it will fix your problem.

If you are nervous about doing it then try Past Special -> Multiply to just
one of the cells and see what it does.

--
Regards,

OssieMac


Eric said:
Multiply will change the date value, which is not what I want.
I have tried Press F2 and Press Enter on each cell, which is only working
approach.
Do you have any suggestions?
Thank everyone very much for any suggestions
Eric

OssieMac said:
Macropod,

I think you mean Paste Special -> Multiply (Not add).


--
Regards,

OssieMac


:

hi Eric,

You don't need a macro:
1. enter the number '1' into any empty cell
2. copy the '1'
3. select the date range and choose Edit|Paste Special > Values > Add > OK
4. if necessary, reformat the cells with the appropriate date format.

--
Cheers
macropod
[Microsoft MVP - Word]


Does anyone have any suggestions on how to code the macro?
There is text in cell A1 22-Aug-2002, which is not belong to date format
until I press F2 and enter, then it will change to 22-Aug-02.
I have a table from A1 to Z5000, does anyone have any suggestions on how to
create a macro to perform this task within this range?
Thanks in advance for any suggestions
Eric

.
 
M

macropod

Oops ...

--
Cheers
macropod
[Microsoft MVP - Word]


OssieMac said:
Macropod,

I think you mean Paste Special -> Multiply (Not add).


--
Regards,

OssieMac


macropod said:
hi Eric,

You don't need a macro:
1. enter the number '1' into any empty cell
2. copy the '1'
3. select the date range and choose Edit|Paste Special > Values > Add > OK
4. if necessary, reformat the cells with the appropriate date format.

--
Cheers
macropod
[Microsoft MVP - Word]


Eric said:
Does anyone have any suggestions on how to code the macro?
There is text in cell A1 22-Aug-2002, which is not belong to date format
until I press F2 and enter, then it will change to 22-Aug-02.
I have a table from A1 to Z5000, does anyone have any suggestions on how to
create a macro to perform this task within this range?
Thanks in advance for any suggestions
Eric
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top