Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I copied you code from the email, pasted it into a module. Renamed a sheet
to be named Data and it ran fine for me. Perhaps you have pasted it inside another procedure or something or picked up a stray End Sub command after the procedure declaration line. -- Regards, Tom Ogilvy "Dee" wrote in message ... Tom: I set up Sheet 1 as my 'data input' and 'parse data' sheet. I set up Sheet 2 as the 'clean data' sheet and named it Data, with my mailing list headers in A1 through H1. I added the following macro to determine the next open row in the Data sheet per your instructions: Sub Append() Set rng = Worksheets("Data").Cells(Rows.Count, "A").End(xlUp)(2) rng.Value = sLast_Name rng.Offset(0, 1).Value = sFirst_Name rng.Offset(0, 2).Value = sOffice rng.Offset(0, 3).Value = sCompany_Address rng.Offset(0, 4).Value = sCity_and_Zip rng.Offset(0, 5).Value = sphone rng.Offset(0, 6).Value = sFax rng.Offset(0, 7).Value = sEmail_Address End Sub and I get the following error message when I run Append: "Set" is highlighted Microsoft Visual Basic error Compile Error: Invalid Outside Procedure What am I doing wrong? Thanks... Dee "Tom Ogilvy" wrote: to find the next open row in you data (assume the sheet with the cleaned up data is named Data) set rng = Worksheets("Data").Cells(rows.count,"A").End(xlup) (2) rng.Value = sLastName rng.offset(0,1).value = sFirstName rng.offset(0,2).Value = sOffice and so forth -- Regards, Tom Ogilvy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reset row hight after string of text edit on a cell | Excel Discussion (Misc queries) | |||
edit text string in column B | Excel Discussion (Misc queries) | |||
Macro to find text string in a column and paste data in another | Excel Discussion (Misc queries) | |||
How to import a text file to Excel treating all input content are in string. | Excel Discussion (Misc queries) | |||
insert data into macro code from text input field? | Excel Programming |