Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I understand you, each time the macro is run you want it to place
the data in the next empty row--then use the following: Public Sub PasteData() Dim PCount As Integer Cells(1, 2).Select PCount = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row + 1 Cells(PCount, 1).Value = "Par1" Cells(PCount, 2).Value = "Par2" Cells(PCount, 3).Value = "Par3" Cells(PCount, 4).Value = "Par4" Cells(PCount, 5).Value = "Par5" End Sub The scope/lifetime of your variable 'PCount' lasts only as long as the procedure is running, once the procedure is finished the variable PCount ceases to exist. HTH--Lonnie M. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete record if cell is empty | Excel Programming | |||
Copy and paste from last record at bottom of column | New Users to Excel | |||
ExcelVBA (Search/Filter/Copy) | Excel Discussion (Misc queries) | |||
how to direct users to the empty row below the last record in excel | Excel Programming | |||
Warn for an Empty Record | Excel Programming |