#1   Report Post  
Posted to microsoft.public.excel.misc
bodhisatvaofboogie
 
Posts: n/a
Default Auto Sum

I am not sure how to classify this problem.

I wish to autosum a column. Usually, clicking on the column at the top to
select the whole thing, then simply clicking the auto sum will place the
subtotal at the bottom of the page. WELL, the bottom of the page happens to
be on line 65536. My document is only like 100 rows deep, so that makes for
a lot of scrolling down LOL. SO, my question is:

How do I auto sum so that the subtotal will just appear in a blank cell
immediately following the last cell in the column with a value? I'm trying
to put this into a macro, so that if I bring in a document that has 300, 500,
or any number of lines it will pick a blank cell at the bottom of the column
with values and not on line 65536... :) THANKS!!!
  #3   Report Post  
Posted to microsoft.public.excel.misc
SteveJ
 
Posts: n/a
Default Auto Sum

Not sure how to write a macro that would take you to "total" line below the
last cell of data. An option I use (to get to any/next cell with data) is to
use the 'arrow key' while holding down 'ctrl.' For instance, if you're in
cell A1 and press 'ctrl' and the down arrow once, you will be taken to the
next blank cell. So if you on say row 1500 and use the above action, you
would be taken to the last row that has data, by pressing the arrow key
again, it would take you to the very bottom of the sheet. Same theory works
with all arrow keys. Hope this option helped. SteveJ

"bodhisatvaofboogie" wrote:

I am not sure how to classify this problem.

I wish to autosum a column. Usually, clicking on the column at the top to
select the whole thing, then simply clicking the auto sum will place the
subtotal at the bottom of the page. WELL, the bottom of the page happens to
be on line 65536. My document is only like 100 rows deep, so that makes for
a lot of scrolling down LOL. SO, my question is:

How do I auto sum so that the subtotal will just appear in a blank cell
immediately following the last cell in the column with a value? I'm trying
to put this into a macro, so that if I bring in a document that has 300, 500,
or any number of lines it will pick a blank cell at the bottom of the column
with values and not on line 65536... :) THANKS!!!

  #5   Report Post  
Posted to microsoft.public.excel.misc
bodhisatvaofboogie
 
Posts: n/a
Default Auto Sum

That is a neat little short cut for moving around, thanks for that. HOWEVER,
as far as creating the macro is concerned, that won't work. I've been
playing around with a macro that is all but finishing correctly. I used a
similar key function to get to the bottom of the colum "end" "down arrow"
takes ya to the bottom. When I put the auto sum in that way, the macro writes
it as changing cell XX in row YY, so if I go to import data that is twice as
long as the previous, it places the auto sum in cell XX in row YY again.
Which is not the bottom of the new data set. LOL

"SteveJ" wrote:

Not sure how to write a macro that would take you to "total" line below the
last cell of data. An option I use (to get to any/next cell with data) is to
use the 'arrow key' while holding down 'ctrl.' For instance, if you're in
cell A1 and press 'ctrl' and the down arrow once, you will be taken to the
next blank cell. So if you on say row 1500 and use the above action, you
would be taken to the last row that has data, by pressing the arrow key
again, it would take you to the very bottom of the sheet. Same theory works
with all arrow keys. Hope this option helped. SteveJ

"bodhisatvaofboogie" wrote:

I am not sure how to classify this problem.

I wish to autosum a column. Usually, clicking on the column at the top to
select the whole thing, then simply clicking the auto sum will place the
subtotal at the bottom of the page. WELL, the bottom of the page happens to
be on line 65536. My document is only like 100 rows deep, so that makes for
a lot of scrolling down LOL. SO, my question is:

How do I auto sum so that the subtotal will just appear in a blank cell
immediately following the last cell in the column with a value? I'm trying
to put this into a macro, so that if I bring in a document that has 300, 500,
or any number of lines it will pick a blank cell at the bottom of the column
with values and not on line 65536... :) THANKS!!!



  #7   Report Post  
Posted to microsoft.public.excel.misc
bodhisatvaofboogie
 
Posts: n/a
Default Auto Sum

Wonderful, I was WAYYYY off. LOL Thanks for the help, all of you are
great. I'm sure I'll be back with questions in my novice ways. :) HUGE
help, really.



"Don Guillett" wrote:

You should have posted YOUR efforts for comments but here.

Sub sumatlastrowincolD()
lastrow = Cells(Rows.Count, "d").End(xlUp).Row
Cells(lastrow + 1, "d") = Application.Sum _
(Range(Cells(1, "d"), Cells(lastrow, "d")))
End Sub

--
Don Guillett
SalesAid Software

"bodhisatvaofboogie" wrote in
message ...
still very new to the macro editing. Just so I don't put it in the wrong
place, where should that be plugged in and how? In simple terms, what
would
the vbe code look like? THANKS!!!

"Don Guillett" wrote:

does this help?

lastrow=cells(rows.count,"a").end(xlup).row

--
Don Guillett
SalesAid Software

"bodhisatvaofboogie" wrote
in
message ...
I am not sure how to classify this problem.

I wish to autosum a column. Usually, clicking on the column at the top
to
select the whole thing, then simply clicking the auto sum will place
the
subtotal at the bottom of the page. WELL, the bottom of the page
happens
to
be on line 65536. My document is only like 100 rows deep, so that
makes
for
a lot of scrolling down LOL. SO, my question is:

How do I auto sum so that the subtotal will just appear in a blank cell
immediately following the last cell in the column with a value? I'm
trying
to put this into a macro, so that if I bring in a document that has
300,
500,
or any number of lines it will pick a blank cell at the bottom of the
column
with values and not on line 65536... :) THANKS!!!






  #8   Report Post  
Posted to microsoft.public.excel.misc
LTUser54
 
Posts: n/a
Default Auto Sum


SteveJ" wrote:

Not sure how to write a macro that would take you to "total" line

below the
last cell of data. An option I use (to get to any/next cell with

data) is to
use the 'arrow key' while holding down 'ctrl.' For instance, if

you're in
cell A1 and press 'ctrl' and the down arrow once, you will be taken

to the
next blank cell. So if you on say row 1500 and use the above action,

you
would be taken to the last row that has data, by pressing the arrow

key
again, it would take you to the very bottom of the sheet. Same theory

works
with all arrow keys. Hope this option helped. SteveJ



Steve,

Thanks for the down arrow tip. I had forgotten about that. Just as a
quick reminder, make sure your NumLock key is off it won't work.

Thanks.

Mark


--
LTUser54
------------------------------------------------------------------------
LTUser54's Profile: http://www.excelforum.com/member.php...o&userid=33459
View this thread: http://www.excelforum.com/showthread...hreadid=543276

  #9   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Auto Sum

glad to help

--
Don Guillett
SalesAid Software

"bodhisatvaofboogie" wrote in
message ...
Wonderful, I was WAYYYY off. LOL Thanks for the help, all of you are
great. I'm sure I'll be back with questions in my novice ways. :) HUGE
help, really.



"Don Guillett" wrote:

You should have posted YOUR efforts for comments but here.

Sub sumatlastrowincolD()
lastrow = Cells(Rows.Count, "d").End(xlUp).Row
Cells(lastrow + 1, "d") = Application.Sum _
(Range(Cells(1, "d"), Cells(lastrow, "d")))
End Sub

--
Don Guillett
SalesAid Software

"bodhisatvaofboogie" wrote
in
message ...
still very new to the macro editing. Just so I don't put it in the
wrong
place, where should that be plugged in and how? In simple terms, what
would
the vbe code look like? THANKS!!!

"Don Guillett" wrote:

does this help?

lastrow=cells(rows.count,"a").end(xlup).row

--
Don Guillett
SalesAid Software

"bodhisatvaofboogie"
wrote
in
message ...
I am not sure how to classify this problem.

I wish to autosum a column. Usually, clicking on the column at the
top
to
select the whole thing, then simply clicking the auto sum will place
the
subtotal at the bottom of the page. WELL, the bottom of the page
happens
to
be on line 65536. My document is only like 100 rows deep, so that
makes
for
a lot of scrolling down LOL. SO, my question is:

How do I auto sum so that the subtotal will just appear in a blank
cell
immediately following the last cell in the column with a value?
I'm
trying
to put this into a macro, so that if I bring in a document that has
300,
500,
or any number of lines it will pick a blank cell at the bottom of
the
column
with values and not on line 65536... :) THANKS!!!








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
Is there a way to link Auto Filter values to a Cell SteveC Excel Worksheet Functions 2 May 1st 06 07:47 PM
Macro for Auto Fill carolini Excel Discussion (Misc queries) 2 December 6th 05 09:11 PM
Averaging Values in Auto Filter Mr. Jan Park Excel Worksheet Functions 1 August 3rd 05 03:51 PM
excel links update not working in auto, calculations in auto Mikey Boy Excel Worksheet Functions 0 December 7th 04 11:53 PM
Why can't my macro use Auto Filter when I told the Sheet Protecti. KC Rippstein Excel Worksheet Functions 1 October 28th 04 06:13 PM


All times are GMT +1. The time now is 02:05 PM.

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

About Us

"It's about Microsoft Excel"