Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Recording macro

Hi all



I have a problem when recording a macro with excel, the problem is that I am
unable to record relative movement that I do when I selected a cell. I
explain better: I have a list of names and I have to cut them to maximum 10
characters, so I copy one (with relative button on) and paste it in another
place, then I select that cell, edit it and push the right arrow ten times
starting to the extreme left, than I cancel anything else. Excel do not
record my movements, but memorize only the result.

Is there a way to make relative, when recording, even my movement when
editing the text of a cell.



Thank you in advance

Nicola



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Recording macro

To my knowledge no. But to help you out with your 10 character thing. If
your text is in cell A1 enter this in B1:
=Left(A1,10)
now B1 will show 10 characters including spaces, whatever is in cell A1.
HTH

"Nicola Debiasi" wrote in message
...
Hi all



I have a problem when recording a macro with excel, the problem is that I

am
unable to record relative movement that I do when I selected a cell. I
explain better: I have a list of names and I have to cut them to maximum

10
characters, so I copy one (with relative button on) and paste it in

another
place, then I select that cell, edit it and push the right arrow ten times
starting to the extreme left, than I cancel anything else. Excel do not
record my movements, but memorize only the result.

Is there a way to make relative, when recording, even my movement when
editing the text of a cell.



Thank you in advance

Nicola





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Recording macro

Try this with the list in Column A

Sub Test()
For Each cell In Columns("A").SpecialCells(xlCellTypeConstants)
cell.Value = Left(cell.Value, 10)
Next
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Nicola Debiasi" wrote in message ...
Hi all



I have a problem when recording a macro with excel, the problem is that I am
unable to record relative movement that I do when I selected a cell. I
explain better: I have a list of names and I have to cut them to maximum 10
characters, so I copy one (with relative button on) and paste it in another
place, then I select that cell, edit it and push the right arrow ten times
starting to the extreme left, than I cancel anything else. Excel do not
record my movements, but memorize only the result.

Is there a way to make relative, when recording, even my movement when
editing the text of a cell.



Thank you in advance

Nicola





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Recording macro

sub trimten()
for each c in selection
c.value=left(c,10)
next

"Nicola Debiasi" wrote in message
...
Hi all



I have a problem when recording a macro with excel, the problem is that I

am
unable to record relative movement that I do when I selected a cell. I
explain better: I have a list of names and I have to cut them to maximum

10
characters, so I copy one (with relative button on) and paste it in

another
place, then I select that cell, edit it and push the right arrow ten times
starting to the extreme left, than I cancel anything else. Excel do not
record my movements, but memorize only the result.

Is there a way to make relative, when recording, even my movement when
editing the text of a cell.



Thank you in advance

Nicola





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Recording macro

Thank you all guys! (to Cliff in particular for his brilliant and incredibly
simple solution!) Now everithing is very easy!

Nicola

"Cliff Myers" ha scritto nel messaggio
...
To my knowledge no. But to help you out with your 10 character thing. If
your text is in cell A1 enter this in B1:
=Left(A1,10)
now B1 will show 10 characters including spaces, whatever is in cell A1.
HTH

"Nicola Debiasi" wrote in message
...
Hi all



I have a problem when recording a macro with excel, the problem is that

I
am
unable to record relative movement that I do when I selected a cell. I
explain better: I have a list of names and I have to cut them to maximum

10
characters, so I copy one (with relative button on) and paste it in

another
place, then I select that cell, edit it and push the right arrow ten

times
starting to the extreme left, than I cancel anything else. Excel do not
record my movements, but memorize only the result.

Is there a way to make relative, when recording, even my movement when
editing the text of a cell.



Thank you in advance

Nicola









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Recording macro

Hi Nicola

If you choose for the formula you can copy it and do a Paste specal to values
You can delete the A column after that

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Nicola Debiasi" wrote in message ...
Thank you all guys! (to Cliff in particular for his brilliant and incredibly
simple solution!) Now everithing is very easy!

Nicola

"Cliff Myers" ha scritto nel messaggio
...
To my knowledge no. But to help you out with your 10 character thing. If
your text is in cell A1 enter this in B1:
=Left(A1,10)
now B1 will show 10 characters including spaces, whatever is in cell A1.
HTH

"Nicola Debiasi" wrote in message
...
Hi all



I have a problem when recording a macro with excel, the problem is that

I
am
unable to record relative movement that I do when I selected a cell. I
explain better: I have a list of names and I have to cut them to maximum

10
characters, so I copy one (with relative button on) and paste it in

another
place, then I select that cell, edit it and push the right arrow ten

times
starting to the extreme left, than I cancel anything else. Excel do not
record my movements, but memorize only the result.

Is there a way to make relative, when recording, even my movement when
editing the text of a cell.



Thank you in advance

Nicola









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Recording macro


Thank you very much Ron, I have copied the formula on my computer, I am sure
it will be very useful!

thank you again!
Nicola

"Ron de Bruin" ha scritto nel messaggio
...
Hi Nicola

If you choose for the formula you can copy it and do a Paste specal to

values
You can delete the A column after that

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Nicola Debiasi" wrote in message

...
Thank you all guys! (to Cliff in particular for his brilliant and

incredibly
simple solution!) Now everithing is very easy!

Nicola

"Cliff Myers" ha scritto nel messaggio
...
To my knowledge no. But to help you out with your 10 character thing.

If
your text is in cell A1 enter this in B1:
=Left(A1,10)
now B1 will show 10 characters including spaces, whatever is in cell

A1.
HTH

"Nicola Debiasi" wrote in message
...
Hi all



I have a problem when recording a macro with excel, the problem is

that
I
am
unable to record relative movement that I do when I selected a cell.

I
explain better: I have a list of names and I have to cut them to

maximum
10
characters, so I copy one (with relative button on) and paste it in
another
place, then I select that cell, edit it and push the right arrow ten

times
starting to the extreme left, than I cancel anything else. Excel do

not
record my movements, but memorize only the result.

Is there a way to make relative, when recording, even my movement

when
editing the text of a cell.



Thank you in advance

Nicola











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
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Macro recording????? Chris Watson Excel Worksheet Functions 1 January 27th 06 09:31 AM
macro recording Tobias Excel Worksheet Functions 2 February 21st 05 04:13 PM
Recording a macro ... Marss Excel Discussion (Misc queries) 3 February 17th 05 07:26 PM


All times are GMT +1. The time now is 09:54 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"