Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default how do I set the position to a specific cell location in excel

I want to make a macro in excel that will go to the end of a data column and
do a summation of the data in the row immediately following the data.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default how do I set the position to a specific cell location in excel

lastrow = Cells(Rows.Count, "A").End(xlUp).Row ' will give last row in column A

Cells(lastrow + 1, "A") = Application.Sum(Range(Cells(2, "A"),
Cells(lastrow, "A")))


HTH

"lpdarspe" wrote:

I want to make a macro in excel that will go to the end of a data column and
do a summation of the data in the row immediately following the data.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default how do I set the position to a specific cell location in excel

and just to give another option, if you want a formula instead of the value for
the total, you could use this

Range("A" & Lastrow + 1).Formula = "=sum(A2:A" & Lastrow & ")"



--


Gary


"lpdarspe" wrote in message
...
I want to make a macro in excel that will go to the end of a data column and
do a summation of the data in the row immediately following the data.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default how do I set the position to a specific cell location in excel

Thank you very much. It fit the requirements exactly!

"Gary Keramidas" wrote:

and just to give another option, if you want a formula instead of the value for
the total, you could use this

Range("A" & Lastrow + 1).Formula = "=sum(A2:A" & Lastrow & ")"



--


Gary


"lpdarspe" wrote in message
...
I want to make a macro in excel that will go to the end of a data column and
do a summation of the data in the row immediately following the data.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default how do I set the position to a specific cell location in excel

Thanks! It fit my requirements exactly!!

"Toppers" wrote:

lastrow = Cells(Rows.Count, "A").End(xlUp).Row ' will give last row in column A

Cells(lastrow + 1, "A") = Application.Sum(Range(Cells(2, "A"),
Cells(lastrow, "A")))


HTH

"lpdarspe" wrote:

I want to make a macro in excel that will go to the end of a data column and
do a summation of the data in the row immediately following the data.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003- Tabbing to a specific location in a cell monty the magician Excel Discussion (Misc queries) 6 May 5th 10 07:13 PM
How to determine the value within specific cell position? Eric Excel Discussion (Misc queries) 5 April 9th 10 01:15 PM
Replacing a specific position in a cell with something else McDal Excel Discussion (Misc queries) 5 May 3rd 05 08:37 PM
hyperlink an excel cell to a specific location wthin application f dirtboy New Users to Excel 1 January 17th 05 08:07 PM
hyperlink an excel cell to a specific location wthin application f dirtboy Excel Discussion (Misc queries) 0 January 17th 05 08:03 PM


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"