Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Paste Special--what is this doing


Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Range("R2").Select
Application.CutCopyMode = False
Selection.Copy
Range("G2:G3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("l2:l3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate
Application.CutCopyMode = False
Range("A1:M3500").Sort Key1:=Range("G2"), Order1:=xlDescending
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("N2").Select
Application.ScreenUpdating = True
End Sub


It looks to my like it is copying what is in R2 and pasting it in th
range G2:G3500. But R2 contains the digit 1 and nothing else and afte
this runs
G2:G3500 does not contain 1.

I inherited this from somebody no longer here and the users are no
able to help.

Thanks
JP

--
JPS@beb
-----------------------------------------------------------------------
JPS@bebe's Profile: http://www.excelforum.com/member.php...fo&userid=3271
View this thread: http://www.excelforum.com/showthread.php?threadid=52545

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Paste Special--what is this doing

Despite the fact that it is crudely done from a recording of the macro, the
intent is to take the number 1 and use it to multiply by the referenced
cells to force them from text to numbers.

--
Don Guillett
SalesAid Software

"JPS@bebe" wrote in
message ...

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Range("R2").Select
Application.CutCopyMode = False
Selection.Copy
Range("G2:G3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("l2:l3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate
Application.CutCopyMode = False
Range("A1:M3500").Sort Key1:=Range("G2"), Order1:=xlDescending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("N2").Select
Application.ScreenUpdating = True
End Sub


It looks to my like it is copying what is in R2 and pasting it in the
range G2:G3500. But R2 contains the digit 1 and nothing else and after
this runs
G2:G3500 does not contain 1.

I inherited this from somebody no longer here and the users are not
able to help.

Thanks
JPS


--
JPS@bebe
------------------------------------------------------------------------
JPS@bebe's Profile:
http://www.excelforum.com/member.php...o&userid=32713
View this thread: http://www.excelforum.com/showthread...hreadid=525453



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Paste Special--what is this doing

i think it's changing text to a number

see if this is more readable and fucntions the same, untested.

Option Explicit
Private Sub CommandButton1_Click()
Dim rng As Range
Application.ScreenUpdating = False

Set rng = Range("R2")
rng.Copy

With rng
Range("G2:G3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

With rng
Range("l2:l3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

With rng
Range("M2:M3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

Range("M2:M3500").NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate

Application.CutCopyMode = False

With Range("A1:M3500")
..Sort Key1:=Range("G2"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With

Range("N2").Select
Application.ScreenUpdating = True
End Sub


--


Gary


"Don Guillett" wrote in message
...
Despite the fact that it is crudely done from a recording of the macro, the
intent is to take the number 1 and use it to multiply by the referenced cells
to force them from text to numbers.

--
Don Guillett
SalesAid Software

"JPS@bebe" wrote in
message ...

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Range("R2").Select
Application.CutCopyMode = False
Selection.Copy
Range("G2:G3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("l2:l3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate
Application.CutCopyMode = False
Range("A1:M3500").Sort Key1:=Range("G2"), Order1:=xlDescending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("N2").Select
Application.ScreenUpdating = True
End Sub


It looks to my like it is copying what is in R2 and pasting it in the
range G2:G3500. But R2 contains the digit 1 and nothing else and after
this runs
G2:G3500 does not contain 1.

I inherited this from somebody no longer here and the users are not
able to help.

Thanks
JPS


--
JPS@bebe
------------------------------------------------------------------------
JPS@bebe's Profile:
http://www.excelforum.com/member.php...o&userid=32713
View this thread: http://www.excelforum.com/showthread...hreadid=525453





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Paste Special--what is this doing

Actually, you should be able to combine the ranges

Range("G2:G3500,l2:l3500,etc").PasteSpecial Paste
--
Don Guillett
SalesAid Software

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i think it's changing text to a number

see if this is more readable and fucntions the same, untested.

Option Explicit
Private Sub CommandButton1_Click()
Dim rng As Range
Application.ScreenUpdating = False

Set rng = Range("R2")
rng.Copy

With rng
Range("G2:G3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

With rng
Range("l2:l3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

With rng
Range("M2:M3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

Range("M2:M3500").NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate

Application.CutCopyMode = False

With Range("A1:M3500")
.Sort Key1:=Range("G2"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With

Range("N2").Select
Application.ScreenUpdating = True
End Sub


--


Gary


"Don Guillett" wrote in message
...
Despite the fact that it is crudely done from a recording of the macro,
the intent is to take the number 1 and use it to multiply by the
referenced cells to force them from text to numbers.

--
Don Guillett
SalesAid Software

"JPS@bebe" wrote
in message ...

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Range("R2").Select
Application.CutCopyMode = False
Selection.Copy
Range("G2:G3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("l2:l3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate
Application.CutCopyMode = False
Range("A1:M3500").Sort Key1:=Range("G2"), Order1:=xlDescending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("N2").Select
Application.ScreenUpdating = True
End Sub


It looks to my like it is copying what is in R2 and pasting it in the
range G2:G3500. But R2 contains the digit 1 and nothing else and after
this runs
G2:G3500 does not contain 1.

I inherited this from somebody no longer here and the users are not
able to help.

Thanks
JPS


--
JPS@bebe
------------------------------------------------------------------------
JPS@bebe's Profile:
http://www.excelforum.com/member.php...o&userid=32713
View this thread:
http://www.excelforum.com/showthread...hreadid=525453







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Paste Special--what is this doing

thanks for pointing that out, don't know how my post ended up as a reply to
yours instead of the op's

--


Gary


"Don Guillett" wrote in message
...
Actually, you should be able to combine the ranges

Range("G2:G3500,l2:l3500,etc").PasteSpecial Paste
--
Don Guillett
SalesAid Software

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i think it's changing text to a number

see if this is more readable and fucntions the same, untested.

Option Explicit
Private Sub CommandButton1_Click()
Dim rng As Range
Application.ScreenUpdating = False

Set rng = Range("R2")
rng.Copy

With rng
Range("G2:G3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

With rng
Range("l2:l3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

With rng
Range("M2:M3500").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With

Range("M2:M3500").NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate

Application.CutCopyMode = False

With Range("A1:M3500")
.Sort Key1:=Range("G2"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With

Range("N2").Select
Application.ScreenUpdating = True
End Sub


--


Gary


"Don Guillett" wrote in message
...
Despite the fact that it is crudely done from a recording of the macro, the
intent is to take the number 1 and use it to multiply by the referenced
cells to force them from text to numbers.

--
Don Guillett
SalesAid Software

"JPS@bebe" wrote in
message ...

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Range("R2").Select
Application.CutCopyMode = False
Selection.Copy
Range("G2:G3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("l2:l3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M2:M3500").Select
Selection.NumberFormat = "m/d;@"
Range("F1:M1").Select
Range("M1").Activate
Application.CutCopyMode = False
Range("A1:M3500").Sort Key1:=Range("G2"), Order1:=xlDescending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("N2").Select
Application.ScreenUpdating = True
End Sub


It looks to my like it is copying what is in R2 and pasting it in the
range G2:G3500. But R2 contains the digit 1 and nothing else and after
this runs
G2:G3500 does not contain 1.

I inherited this from somebody no longer here and the users are not
able to help.

Thanks
JPS


--
JPS@bebe
------------------------------------------------------------------------
JPS@bebe's Profile:
http://www.excelforum.com/member.php...o&userid=32713
View this thread: http://www.excelforum.com/showthread...hreadid=525453









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
Paste and Paste Special No Longer Working - Excel 2003 SheriJ Excel Discussion (Misc queries) 2 January 15th 09 09:23 PM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
Cut and Paste using Macro gives paste special method error Lourens Pentz Excel Programming 3 November 21st 04 10:42 PM
How do I capture user paste action and convert to Paste Special DonC Excel Programming 0 November 19th 04 01:43 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM


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