#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Macro's

I want to create a macro that will carry out actions on cells below each
other or side by side automatically. I think it is called creating a loop
macro but not to sure.
At present i have a spread sheet which i input data (copy and paste) from
another application. The data is numeric, but when i paste it into excel is
thinks its a text entry. I have done all the normal stuff but i have to place
the cursor at the end of the data in the cell, press F2 and then backspace.
This is the action i would like to run the macro on as i have to do this in
every cell.

I have create a macro to do this action but it will not allow me to
highlight an area and run it for every cell.

Can anyone help please???
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Macro's

For Each cell In selection
'do your stuff
Next cell

--

HTH

Bob Phillips

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

"148steve" wrote in message
...
I want to create a macro that will carry out actions on cells below each
other or side by side automatically. I think it is called creating a loop
macro but not to sure.
At present i have a spread sheet which i input data (copy and paste) from
another application. The data is numeric, but when i paste it into excel

is
thinks its a text entry. I have done all the normal stuff but i have to

place
the cursor at the end of the data in the cell, press F2 and then

backspace.
This is the action i would like to run the macro on as i have to do this

in
every cell.

I have create a macro to do this action but it will not allow me to
highlight an area and run it for every cell.

Can anyone help please???



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Macro's

Thanks Bob, but i'm a bit of a thicky when it comes to this, can you explain
a bit more simply how i would do this....

Thanks again

"Bob Phillips" wrote:

For Each cell In selection
'do your stuff
Next cell

--

HTH

Bob Phillips

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

"148steve" wrote in message
...
I want to create a macro that will carry out actions on cells below each
other or side by side automatically. I think it is called creating a loop
macro but not to sure.
At present i have a spread sheet which i input data (copy and paste) from
another application. The data is numeric, but when i paste it into excel

is
thinks its a text entry. I have done all the normal stuff but i have to

place
the cursor at the end of the data in the cell, press F2 and then

backspace.
This is the action i would like to run the macro on as i have to do this

in
every cell.

I have create a macro to do this action but it will not allow me to
highlight an area and run it for every cell.

Can anyone help please???




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Macro's

You said that you already had code to do the F2 stuff. Wrap your code in
those two lines, and change references to specific cells/ranges to the cell
object variable.

--

HTH

Bob Phillips

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

"148steve" wrote in message
...
Thanks Bob, but i'm a bit of a thicky when it comes to this, can you

explain
a bit more simply how i would do this....

Thanks again

"Bob Phillips" wrote:

For Each cell In selection
'do your stuff
Next cell

--

HTH

Bob Phillips

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

"148steve" wrote in message
...
I want to create a macro that will carry out actions on cells below

each
other or side by side automatically. I think it is called creating a

loop
macro but not to sure.
At present i have a spread sheet which i input data (copy and paste)

from
another application. The data is numeric, but when i paste it into

excel
is
thinks its a text entry. I have done all the normal stuff but i have

to
place
the cursor at the end of the data in the cell, press F2 and then

backspace.
This is the action i would like to run the macro on as i have to do

this
in
every cell.

I have create a macro to do this action but it will not allow me to
highlight an area and run it for every cell.

Can anyone help please???






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Macro's

I would Format all to General then copy an empty cell.

Select the data range and EditPaste Special(in place)AddOKEsc

That will chnage the text to numbers.

No need to F2 and Enter in each cell.

BTW.....macros won't record steps or run while you're in Edit mode.


Gord Dibben MS Excel MVP

On Tue, 14 Nov 2006 07:40:02 -0800, 148steve
wrote:

I want to create a macro that will carry out actions on cells below each
other or side by side automatically. I think it is called creating a loop
macro but not to sure.
At present i have a spread sheet which i input data (copy and paste) from
another application. The data is numeric, but when i paste it into excel is
thinks its a text entry. I have done all the normal stuff but i have to place
the cursor at the end of the data in the cell, press F2 and then backspace.
This is the action i would like to run the macro on as i have to do this in
every cell.

I have create a macro to do this action but it will not allow me to
highlight an area and run it for every cell.

Can anyone help please???


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
Deleting phantom macros [email protected] Setting up and Configuration of Excel 2 September 8th 06 11:47 AM
Strip workbook of macros, VBA, MS Query, etc. Paul Kraemer Excel Discussion (Misc queries) 4 September 7th 06 01:30 PM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
how do I run excel 4.0 macros on excel 2000 RodolfoDallas Excel Discussion (Misc queries) 1 March 12th 06 03:14 AM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM


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

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

About Us

"It's about Microsoft Excel"