Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to add a row of data to a worksheet using a macro? I need to
determine the last row of data already there and then append on the next row some static data. The rows of data will change each time I use this workbook. Example: On a cloumn with 1224 rows of data, I need to add on the 1225 row the number 1000 automatically. The rows of data will change each time I use this workbook. Thank you Ric |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this line will select the first blank cell in column A on the active sheet.
activesheet.cells(rows.count, "A").end(xlup).offset(1, 0).select -- HTH... Jim Thomlinson "Rick" wrote: Is there a way to add a row of data to a worksheet using a macro? I need to determine the last row of data already there and then append on the next row some static data. The rows of data will change each time I use this workbook. Example: On a cloumn with 1224 rows of data, I need to add on the 1225 row the number 1000 automatically. The rows of data will change each time I use this workbook. Thank you Ric |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I actually have tried this and believe it is working but how would I enter
the data in this cell? I have tried things such as ActiveCell.FormulaR1C1 = "1000" but I must be missing something. "Jim Thomlinson" wrote: this line will select the first blank cell in column A on the active sheet. activesheet.cells(rows.count, "A").end(xlup).offset(1, 0).select -- HTH... Jim Thomlinson "Rick" wrote: Is there a way to add a row of data to a worksheet using a macro? I need to determine the last row of data already there and then append on the next row some static data. The rows of data will change each time I use this workbook. Example: On a cloumn with 1224 rows of data, I need to add on the 1225 row the number 1000 automatically. The rows of data will change each time I use this workbook. Thank you Ric |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
activesheet.cells(rows.count, "A").end(xlup).offset(1, 0).select activecell.value = "This" Activecell.offset(0, 1) = "That" -- HTH... Jim Thomlinson "Rick" wrote: I actually have tried this and believe it is working but how would I enter the data in this cell? I have tried things such as ActiveCell.FormulaR1C1 = "1000" but I must be missing something. "Jim Thomlinson" wrote: this line will select the first blank cell in column A on the active sheet. activesheet.cells(rows.count, "A").end(xlup).offset(1, 0).select -- HTH... Jim Thomlinson "Rick" wrote: Is there a way to add a row of data to a worksheet using a macro? I need to determine the last row of data already there and then append on the next row some static data. The rows of data will change each time I use this workbook. Example: On a cloumn with 1224 rows of data, I need to add on the 1225 row the number 1000 automatically. The rows of data will change each time I use this workbook. Thank you Ric |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your example was perfect! Thank you.
"Jim Thomlinson" wrote: Try this activesheet.cells(rows.count, "A").end(xlup).offset(1, 0).select activecell.value = "This" Activecell.offset(0, 1) = "That" -- HTH... Jim Thomlinson "Rick" wrote: I actually have tried this and believe it is working but how would I enter the data in this cell? I have tried things such as ActiveCell.FormulaR1C1 = "1000" but I must be missing something. "Jim Thomlinson" wrote: this line will select the first blank cell in column A on the active sheet. activesheet.cells(rows.count, "A").end(xlup).offset(1, 0).select -- HTH... Jim Thomlinson "Rick" wrote: Is there a way to add a row of data to a worksheet using a macro? I need to determine the last row of data already there and then append on the next row some static data. The rows of data will change each time I use this workbook. Example: On a cloumn with 1224 rows of data, I need to add on the 1225 row the number 1000 automatically. The rows of data will change each time I use this workbook. Thank you Ric |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
lastrow = cells(rows.count,1).End(xlup).row
nextrow = lastrow + 1 -- Regards, Tom Ogilvy "Rick" wrote in message ... Is there a way to add a row of data to a worksheet using a macro? I need to determine the last row of data already there and then append on the next row some static data. The rows of data will change each time I use this workbook. Example: On a cloumn with 1224 rows of data, I need to add on the 1225 row the number 1000 automatically. The rows of data will change each time I use this workbook. Thank you Ric |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this should total column a:
lastrow = Cells(Rows.Count, "A").End(xlUp).Row Range("A" & lastrow).Offset(1, 0).Formula = "=sum(A1:a" & lastrow & ")" -- Gary "Rick" wrote in message ... Is there a way to add a row of data to a worksheet using a macro? I need to determine the last row of data already there and then append on the next row some static data. The rows of data will change each time I use this workbook. Example: On a cloumn with 1224 rows of data, I need to add on the 1225 row the number 1000 automatically. The rows of data will change each time I use this workbook. Thank you Ric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete duplicate record but only determine 1 column data | Excel Worksheet Functions | |||
Can I get Excel to determine the line curve formula without graph. | Excel Discussion (Misc queries) | |||
How to Determine if column of certain rows in a text file has data? | Excel Programming | |||
formula to determine the first column containing any data | Excel Worksheet Functions | |||
Determine the last column of data | Excel Programming |