Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default Go to cell below last entry in column and total

I am doing a macro and I would like for it to automatically go to the cell
below last entry in a column and total. (row count will be different each
time I run the macro) One of the columns has entries in every cell,, and my
other column may have blanks cells in the column. Thanks for your help.
Donna
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Go to cell below last entry in column and total

Try the below which will insert a total to Col B after last row with data in
the active sheet

Sub Macro()
Dim lngRow As Long
lngRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row + 1
Range("B" & lngRow) = "=SUM(B1:B" & lngRow - 1 & ")"
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Donna" wrote:

I am doing a macro and I would like for it to automatically go to the cell
below last entry in a column and total. (row count will be different each
time I run the macro) One of the columns has entries in every cell,, and my
other column may have blanks cells in the column. Thanks for your help.
Donna

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
Adding entry in one cell to a running total in another cell TommyB Excel Worksheet Functions 1 March 12th 09 12:11 AM
copy value of cell from last entry in column Jay Trull Excel Worksheet Functions 1 April 23rd 06 03:10 AM
Return entry in column above/below cell TheRobsterUK Excel Worksheet Functions 2 November 17th 05 04:34 PM
Move the last entry in a column to a different cell, when the loc. MicroSoft Excell (?) Excel Worksheet Functions 2 January 7th 05 10:29 PM
how do i set up a single cell continual entry in excel to total f. mike@swallow Excel Discussion (Misc queries) 1 December 7th 04 01:29 PM


All times are GMT +1. The time now is 11:50 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"