Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code the macro?

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default How to code the macro?

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" wrote in message ...
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default How to code the macro?

Macropod,

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


--
Regards,

OssieMac


"macropod" wrote:

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" wrote in message ...
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

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code the macro?

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" wrote:

Macropod,

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


--
Regards,

OssieMac


"macropod" wrote:

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" wrote in message ...
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

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default How to code the macro?

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" wrote:

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" wrote:

Macropod,

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


--
Regards,

OssieMac


"macropod" wrote:

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" wrote in message ...
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

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code the macro?

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

"OssieMac" wrote:

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" wrote:

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" wrote:

Macropod,

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


--
Regards,

OssieMac


"macropod" wrote:

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" wrote in message ...
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

.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default How to code the macro?

Oops ...

--
Cheers
macropod
[Microsoft MVP - Word]


"OssieMac" wrote in message ...
Macropod,

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


--
Regards,

OssieMac


"macropod" wrote:

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" wrote in message ...
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

.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default How to code the macro?

Try DataText To Columns. Step 3 has a date formatting option.

--

HTH

Bob Phillips

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

"Eric" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro code to dll and vba code trouble shoot. mario Excel Programming 0 May 15th 08 07:07 PM
Slow code when used as VBA code instead of macro (copying visible columns) [email protected] Excel Programming 3 April 2nd 07 05:26 PM
Can I use code/macro to change code/macro in an existing file? Scott Bedows Excel Programming 2 February 14th 07 05:50 AM
read macro code by vb code Francesco Geri Excel Programming 2 October 7th 05 10:24 AM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"