Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro newbie
Hi folks-
I have two sheets in my workbook: Data and Table. I would like to compile a table based on my 5-cell range (A1:E1) in my Data sheet. However, I need this data to appear in the next available cell in Column B on my Table sheet. I've tried looking at previous responses to this similar question and have failed miserably in an attempt to try to work this properly. Here is what I have thus far: Sub test1() Sheets("Data").Select Range("A1:E1").Select Selection.Copy Sheets("Table").Select Range("B10").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub Thank you for sharing your VB knowledge with me. Sincerely, Joe |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro newbie
What to you mean by next available cell in Column B?
Do you mean the first available empty cell in coloumn B? Sharad "VB Newbie" <VB wrote in message ... Hi folks- I have two sheets in my workbook: Data and Table. I would like to compile a table based on my 5-cell range (A1:E1) in my Data sheet. However, I need this data to appear in the next available cell in Column B on my Table sheet. I've tried looking at previous responses to this similar question and have failed miserably in an attempt to try to work this properly. Here is what I have thus far: Sub test1() Sheets("Data").Select Range("A1:E1").Select Selection.Copy Sheets("Table").Select Range("B10").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub Thank you for sharing your VB knowledge with me. Sincerely, Joe |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro newbie
Forget the irrelevant "Dim rSource as Range" line, of course
-- Return email address is not as DEEP as it appears "Jack Schitt" wrote in message ... "VB Newbie" <VB wrote in message ... Hi folks- I have two sheets in my workbook: Data and Table. I would like to compile a table based on my 5-cell range (A1:E1) in my Data sheet. However, I need this data to appear in the next available cell in Column B on my Table sheet. I've tried looking at previous responses to this similar question and have failed miserably in an attempt to try to work this properly. Here is what I have thus far: Sub test1() Sheets("Data").Select Range("A1:E1").Select Selection.Copy Sheets("Table").Select Range("B10").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub Thank you for sharing your VB knowledge with me. Sincerely, Joe A couple of possibilities: Option Explicit Sub MyCopy1() Dim rCell As Range With Application With .ThisWorkbook Set rCell = .Worksheets("Table").Range("B65536").End(xlUp).Off set(1, 0) .Worksheets("Data").Range("A1:E1").Copy rCell.PasteSpecial Paste:=xlValues End With '.Thisworkbook .CutCopyMode = False End With 'Application End Sub 'MyCopy1() Sub MyCopy2() Dim rCell As Range Dim rSource As Range With Application.ThisWorkbook Set rCell = .Worksheets("Table").Range("B65536").End(xlUp).Off set(1, 0).Resize(1, 5) rCell.Value = .Worksheets("Data").Range("A1:E1").Value End With 'Application.ThisWorkbook End Sub 'MyCopy2() -- Return email address is not as DEEP as it appears |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Newbie Macro Question | Excel Discussion (Misc queries) | |||
Newbie: VBA? Macro? Please Advise... | Excel Discussion (Misc queries) | |||
VBA Newbie - Simple Macro | Excel Programming | |||
Loop macro for a Newbie | Excel Programming | |||
Macro Help for Newbie | Excel Programming |