Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coping values to the next empty row
I need code that will paste two separate values in one
worksheet in the next available row. One value in column "A" and the other value in column "B". The code would paste the values as the user shuts down the program in the same row of a specified worksheet. I need this to collect a series of values from separate users who use this program at different times of the day. Thanks in advance, Rich |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coping values to the next empty row
I assume that you have no problems coping but wish this:
The following pair would add values to the row beneath the bottom of the sheet. If you want to put it somewhere higher, that will depend on the design of your application, likely involving xlDown or such. dim lLastRow as long lLastRow = ActiveCell.SpecialCells(xlLastCell).Row Range("A1").Offset(lLastRow, 0)="1st" Range("A1").Offset(lLastRow, 1)="2nd" Some considerations, best investigated by typing Control-End on your sheet: when sheet already extends to row 65536 when sheet has had rows deleted, so that the bottom of the sheet is artificially "low" when sheet has cells with formats but no values, so that the bottom is artificially "low" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
empty values for a specific field | Excel Discussion (Misc queries) | |||
Defauls Values In Empty Cells | New Users to Excel | |||
How to select cells with values only (not empty ones)? | Excel Discussion (Misc queries) | |||
Empty Chart Values | Excel Worksheet Functions | |||
Coping Values - Not the cell | Excel Programming |