Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: Copying and pasting to Sheets...
Dear ExcelTip Experts... I have created a button on a main sheet. Upon pressin this button, i will check the values of column C's Cells. If any of the values match WORKSHEET name, It will copy a variety of cells, and paste it to th WORKSHEET with the matching name to the cell. here is my code... Code ------------------- Private Sub CmdUpdate_Click() For Each Sheet In ActiveWorkbook.Sheets Select Case Sheet.Name Case "Master Numbers" ' DO NOTHING Case Else For Sheetnamerange = 1 To 999 If Sheet.Name = Range("C" & Sheetnamerange) Then Range("A" & Sheetnamerange & ":B" & Sheetnamerange).Select Selection.Copy Sheets(Range("C2").Value).Select Range("A" & Sheetnamerange + 1 & ":B" & Sheetnamerange + 1).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,_ SkipBlanks:=False, Transpose:=False Sheets("Master Numbers").Select Range("D" & Sheetnamerange + 1 & ":H" & Sheetnamerange + 1).Select Application.CutCopyMode = False Selection.Copy Sheets(Range("C2").Value).Select Range("C" & Sheetnamerange + 1 & ":G" & Sheetnamerange + 1).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,_ SkipBlanks:=False, Transpose:=False End If Next End Select Next End Su ------------------- I just cant get this to work -- aking198 ----------------------------------------------------------------------- aking1987's Profile: http://www.excelforum.com/member.php...fo&userid=1539 View this thread: http://www.excelforum.com/showthread.php?threadid=31479 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying and Pasting | Excel Discussion (Misc queries) | |||
Copying and pasting | Excel Discussion (Misc queries) | |||
Copying and pasting ??? | Excel Discussion (Misc queries) | |||
Pasting on Filtered Data Sheets without pasting onto hidden cells | Excel Discussion (Misc queries) | |||
Problem copying range and pasting to multiple sheets | Excel Programming |