LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shift columns each click of the button


Hello Programmers,

This code takes data from selected cells on sheet 1, then tranfers them
to a column starting with C on sheet2. How do I add to this code, so
that the next time I hit the macro button, the data shifts over to
column D, then E, etc...


'subroutine to transfer data to another sheet

Sub TransferData()
Application.ScreenUpdating = False
Sheets("WorksheetCopy").Range("B1:B2").Copy
Sheets("Worksheet Info").Range("D3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Sheets("WorksheetCopy").Range("D31:D34").Copy
Sheets("Worksheet Info").Range("D6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Sheets("WorksheetCopy").Range("D36:D39").Copy
Sheets("Worksheet Info").Range("D10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Range("D23").Select
Application.ScreenUpdating = True
End Sub
Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=374920

 
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
Shift + toolbar button action in Excel 2007 Alojz Excel Discussion (Misc queries) 0 February 17th 09 08:41 PM
Combination of shift with toolbar button. Alojz Excel Discussion (Misc queries) 0 February 11th 09 10:26 PM
When I hit shift + left click highlighted object stuck. Shawn Andros Excel Discussion (Misc queries) 1 July 7th 06 11:47 PM
shift right 5 columns raymond chiu Excel Worksheet Functions 1 November 22nd 05 05:15 AM
capture shift-double-click Rob Bovey Excel Programming 0 July 13th 03 09:56 AM


All times are GMT +1. The time now is 08:58 PM.

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"