Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Paste unformatted text

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Paste unformatted text

Assign a shortcut like, say CNTRL-e, to this:

Sub Macro1()
Selection.PasteSpecial Paste:=xlPasteValues
End Sub


So you copy with CNTRL-c and paste with CNTRL-e
--
Gary''s Student - gsnu200801


"GregNga" wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Paste unformatted text

Sub paste_destination_format()
Selection.PasteSpecial Paste:=xlPasteFormulas
Application.CutCopyMode = False
End Sub

Select and copy a range, select a destination cell then run the macro.


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 11:42:00 -0700, GregNga
wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Paste unformatted text

I tried both Gary's and Gord's examples and got runtime error '1004' (Paste
special method of rangeclass failed) on both of them.

I didn't mention that I have Excel 2003, don't know if that matters

"Gord Dibben" wrote:

Sub paste_destination_format()
Selection.PasteSpecial Paste:=xlPasteFormulas
Application.CutCopyMode = False
End Sub

Select and copy a range, select a destination cell then run the macro.


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 11:42:00 -0700, GregNga
wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default Paste unformatted text

GregNga wrote on Tue, 26 Aug 2008 11:42:00 -0700:

Is there a way to paste unformatted text, the equivalent of
'match destination format' from the drop down box after doing
a paste. I would like to create a ,macro to do this ot assign
a keyboard shortcut to an already existing command, if one
exists. I am trying to avoid having to click the down arrow
and select 'match destination format' evertime I do a paste


Will Steve Miller's PureText utility ( www.stevemiller.net ) do what you
want? It is a very useful method of cleaning up formatted copied text.
--

James Silverton
Potomac, Maryland

Email, with obvious alterations: not.jim.silverton.at.verizon.not



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Paste unformatted text

Did you first select and copy a range as instructed?

Select and copy a range, select a destination cell then run the macro.


Without that the code will throw up the error you see.


Gord

On Tue, 26 Aug 2008 12:49:01 -0700, GregNga
wrote:

I tried both Gary's and Gord's examples and got runtime error '1004' (Paste
special method of rangeclass failed) on both of them.

I didn't mention that I have Excel 2003, don't know if that matters

"Gord Dibben" wrote:

Sub paste_destination_format()
Selection.PasteSpecial Paste:=xlPasteFormulas
Application.CutCopyMode = False
End Sub

Select and copy a range, select a destination cell then run the macro.


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 11:42:00 -0700, GregNga
wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Paste unformatted text

Yes, here are the steps:

1) Select cells 6A, 6B, 6C, 6D

2) With those cells highlighted, went to EDIT menu and select COPY option

3) Place cursor in cell 12A

4) Go to TOOLS menu and run MACRO. The runtime 1004 error appears

I'm sure the cells were copied succesfully in step 2 because when I do CTRL
+ V after I make the error go away. the copied cells are succesfully pasted
(they just don't have the formatting removed)

"Gord Dibben" wrote:

Did you first select and copy a range as instructed?

Select and copy a range, select a destination cell then run the macro.


Without that the code will throw up the error you see.


Gord

On Tue, 26 Aug 2008 12:49:01 -0700, GregNga
wrote:

I tried both Gary's and Gord's examples and got runtime error '1004' (Paste
special method of rangeclass failed) on both of them.

I didn't mention that I have Excel 2003, don't know if that matters

"Gord Dibben" wrote:

Sub paste_destination_format()
Selection.PasteSpecial Paste:=xlPasteFormulas
Application.CutCopyMode = False
End Sub

Select and copy a range, select a destination cell then run the macro.


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 11:42:00 -0700, GregNga
wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Paste unformatted text

I cannot replicate the error using the macro I posted using Excel 2003.

All I get is the data pasted with destination formatting.

Do you get the effect you want if you just Copy then Paste
SpecialFormulasOKEsc?

No macro involved.


Gord

On Tue, 26 Aug 2008 18:36:05 -0700, GregNga
wrote:

Yes, here are the steps:

1) Select cells 6A, 6B, 6C, 6D

2) With those cells highlighted, went to EDIT menu and select COPY option

3) Place cursor in cell 12A

4) Go to TOOLS menu and run MACRO. The runtime 1004 error appears

I'm sure the cells were copied succesfully in step 2 because when I do CTRL
+ V after I make the error go away. the copied cells are succesfully pasted
(they just don't have the formatting removed)

"Gord Dibben" wrote:

Did you first select and copy a range as instructed?

Select and copy a range, select a destination cell then run the macro.


Without that the code will throw up the error you see.


Gord

On Tue, 26 Aug 2008 12:49:01 -0700, GregNga
wrote:

I tried both Gary's and Gord's examples and got runtime error '1004' (Paste
special method of rangeclass failed) on both of them.

I didn't mention that I have Excel 2003, don't know if that matters

"Gord Dibben" wrote:

Sub paste_destination_format()
Selection.PasteSpecial Paste:=xlPasteFormulas
Application.CutCopyMode = False
End Sub

Select and copy a range, select a destination cell then run the macro.


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 11:42:00 -0700, GregNga
wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Paste unformatted text

EDIT | PASTE SPECIAL | FORMULAS works fine. However, when I select the same
cells and run the macro, I still get the error. One thing I just noticed,
though, when I select the text from another apllication (like WORD) and copy
it to the clipboard and then go to EXCEL and run the macro, it seems to work
fine. It's when I do the copy in Excel that I have the problem. Even when I
only select one cell, I still get the error. The macro even seems to work,
when I select/copy the text from Internet Explorer, just not when I do the
same in Excel, go figure.

"Gord Dibben" wrote:

I cannot replicate the error using the macro I posted using Excel 2003.

All I get is the data pasted with destination formatting.

Do you get the effect you want if you just Copy then Paste
SpecialFormulasOKEsc?

No macro involved.


Gord

On Tue, 26 Aug 2008 18:36:05 -0700, GregNga
wrote:

Yes, here are the steps:

1) Select cells 6A, 6B, 6C, 6D

2) With those cells highlighted, went to EDIT menu and select COPY option

3) Place cursor in cell 12A

4) Go to TOOLS menu and run MACRO. The runtime 1004 error appears

I'm sure the cells were copied succesfully in step 2 because when I do CTRL
+ V after I make the error go away. the copied cells are succesfully pasted
(they just don't have the formatting removed)

"Gord Dibben" wrote:

Did you first select and copy a range as instructed?

Select and copy a range, select a destination cell then run the macro.

Without that the code will throw up the error you see.


Gord

On Tue, 26 Aug 2008 12:49:01 -0700, GregNga
wrote:

I tried both Gary's and Gord's examples and got runtime error '1004' (Paste
special method of rangeclass failed) on both of them.

I didn't mention that I have Excel 2003, don't know if that matters

"Gord Dibben" wrote:

Sub paste_destination_format()
Selection.PasteSpecial Paste:=xlPasteFormulas
Application.CutCopyMode = False
End Sub

Select and copy a range, select a destination cell then run the macro.


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 11:42:00 -0700, GregNga
wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste






  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Paste unformatted text

Can you tell me how to assign a shortcut key to this

"Gary''s Student" wrote:

Assign a shortcut like, say CNTRL-e, to this:

Sub Macro1()
Selection.PasteSpecial Paste:=xlPasteValues
End Sub


So you copy with CNTRL-c and paste with CNTRL-e
--
Gary''s Student - gsnu200801


"GregNga" wrote:

Is there a way to paste unformatted text, the equivalent of 'match
destination format' from the drop down box after doing a paste. I would like
to create a ,macro to do this ot assign a keyboard shortcut to an already
existing command, if one exists. I am trying to avoid having to click the
down arrow and select 'match destination format' evertime I do a paste

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
Unformatted, formatted excel documents(?) shnim1 Setting up and Configuration of Excel 4 February 9th 08 08:11 PM
Paste Special\Unformatted Text\Display as Icon sam Excel Discussion (Misc queries) 0 January 8th 08 03:46 PM
Pasting unformatted text Erik Wikström Excel Discussion (Misc queries) 0 September 19th 07 01:57 PM
countif on unformatted dates [email protected] Excel Worksheet Functions 3 June 26th 06 03:44 AM
merge unformatted date with text Art Excel Discussion (Misc queries) 2 March 18th 05 05:28 PM


All times are GMT +1. The time now is 02:24 PM.

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"