Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I Paste thie answer into specific cell using vb...tia sal
Greetings All,
I would like to paste the answer that is produced by this code into cell "B1" does anyone know the proper syntax. Sub col_to_cel() Dim str As String Dim c As Range, rn As Range Set rn = Selection str = "" For Each c In rn.Cells str = str & "" & c.Value Next str = Right(str, Len(str)) rn.Offset(1, 0).Cells(rn.Rows.Count, 1).Value = str End Sub TIA SAL |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I Paste thie answer into specific cell using vb...tia sal
guess someone gave you this code and you want to modify it? If so:
Sub col_to_cel() Dim str As String Dim c As Range, rn As Range Set rn = Selection str = "" For Each c In rn.Cells str = str & "" & c.Value Next str = Right(str, Len(str)) 'rn.Offset(1, 0).Cells(rn.Rows.Count, 1).Value = str Range("B1").Value = str End Sub -- Regards, Tom Ogilvy wrote in message . .. Greetings All, I would like to paste the answer that is produced by this code into cell "B1" does anyone know the proper syntax. Sub col_to_cel() Dim str As String Dim c As Range, rn As Range Set rn = Selection str = "" For Each c In rn.Cells str = str & "" & c.Value Next str = Right(str, Len(str)) rn.Offset(1, 0).Cells(rn.Rows.Count, 1).Value = str End Sub TIA SAL |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I get a macro to populate the answer into one specific cel | Excel Discussion (Misc queries) | |||
Not allowing to continu unless a specific cell has specific answer | Excel Discussion (Misc queries) | |||
Paste Specific Cell to Selected Cell | Excel Worksheet Functions | |||
A Macro that will cut and paste to specific cell | Excel Discussion (Misc queries) | |||
Macro to Paste to specific line, and continue to Paste each time on next row not over | Excel Programming |