Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Im stumped.
The following code works just fine but is one step beyond what the macro recorder could do and I would like to graduate to the next level of programming in Excel. I have reviewed what is in the news groups and tried a few but cant seem to modify the code to work for me. Any suggestions? Tks. My code 'goto back to the GetReadyData Workbook ActiveWindow.ActivateNext Sheets("Data").Select vCellAddressCount = 1 vBODC = 1 Range("A1").Select Selection.End(xlDown).Select ActiveCell.Offset(1, 0).Range("A1").Select 'Down vPDC = 1 If vPLCount = 0 Then For i = 1 To 16 'Pastes all of the Business Office Section ActiveCell = vBOD(vBODC) ActiveCell.Offset(0, 1).Range("A1").Select 'Right vBODC = vBODC + 1 Next i ActiveCell = "No Parts" ActiveCell.Offset(0, 1).Range("A1").Select 'Right vPDC = vPDC + 1 vCurrentRow = ActiveCell.Row 'Inputs NOW() into X+Row() vCurrentRow = "X" & vCurrentRow Range(vCurrentRow).Select ActiveCell = Now() ActiveCell.Offset(1, 0).Range("A1").Select 'Down Selection.End(xlToLeft).Select vBODC = 1 End If For Z = 1 To vPLCount For i = 1 To 16 'Pastes all of the Business Office Section ActiveCell = vBOD(vBODC) ActiveCell.Offset(0, 1).Range("A1").Select 'Right vBODC = vBODC + 1 Next i ' vPLICount = vRowCount / 2 For i = 1 To 6 'Pastes all of the Parts Items Section If vPLICount 0 Then ActiveCell = vPD(vPDC) ActiveCell.Offset(0, 1).Range("A1").Select 'Right vPDC = vPDC + 1 Else ActiveCell = "No Parts" ActiveCell.Offset(0, 1).Range("A1").Select 'Right vPDC = vPDC + 1 End If Next i vCurrentRow = ActiveCell.Row 'Inputs NOW() into X+Row() vCurrentRow = "X" & vCurrentRow Range(vCurrentRow).Select ActiveCell = Now() ActiveCell.Offset(1, 0).Range("A1").Select 'Down Selection.End(xlToLeft).Select vBODC = 1 Next Z Code I found which works but does not paste in a row but rather in a column With Worksheets("Data") Set NextCell = .Cells(.Rows.count, "A").End(xlUp).Offset(1, 0) End With NextCell.Resize(UBound(vBOD) - LBound(vBOD) + 1, 1).Value = Application.Transpose(vBOD) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Paste and Paste Special No Longer Working - Excel 2003 | Excel Discussion (Misc queries) | |||
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
Macro to Paste to specific line, and continue to Paste each time on next row not over | Excel Programming |