Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Auto-sum (without SendKeys)

I have about 50,000 entries (dollar amounts) in Column A. At various (a
couple of thousand) rows, there are empty cells. If I position my cell at
the very bottom (the last empty cell) and I click the auto-sum icon, that
will (correctly) sum the values until the next empty cell (above) is reached.
However, the "record macro" sees that action as either an absolute cell
address (which I don't want) or a specific number of rows (relative address)
which I don't want, either, because the addresses and number of rows change
throughout Column A. So, that macro won't work if I want it to repeat until
it reaches A1.

So, I tried all of these (to represent Alt-equals and then Enter)

SendKeys "%(=){ENTER}"

SendKeys "%={ENTER}"

SendKeys "%(=)"
SendKeys "{ENTER}"

SendKeys "%="
SendKeys "{ENTER}"

but none of 'em worked ... it seemed like Excel didn't even recognize the
SendKeys command ... I mean, nothing happened.

How can I tell my macro to autosum without specifying specific cell
addresses or number of rows? I suspect that there's a simple answer but I
just can't seem to get my head around it.

Dan








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
SendKeys [email protected] Excel Programming 1 July 25th 05 06:05 PM
SendKeys in VBA John Excel Programming 1 June 24th 05 05:46 PM
Sendkeys Jim Excel Programming 1 April 16th 05 06:44 PM
SendKeys? CMK Excel Programming 2 February 23rd 05 12:03 AM
SendKeys Ron de Bruin Excel Programming 3 August 25th 03 10:21 PM


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