Move ActiveCell down 12 then add up 11 above....  
Author Message
SeanCurtis





PostPosted: Tue Jun 22 10:36:06 CDT 2004 Top

Excel Programming >> Move ActiveCell down 12 then add up 11 above....

ok - now how do i Move ActiveCell down 12 then add up 11 above....



_________________________________________

Willow: "I knew it! I knew it! Well, not in the sense of having the
slightest idea, but I knew there was something I didn't know."

http://www.hide-link.com/

*** Sent via Devdex http://www.hide-link.com/ ***
Don't just participate in USENET...get rewarded for it!

Excel319  
 
 
Ed





PostPosted: Tue Jun 22 10:36:06 CDT 2004 Top

Excel Programming >> Move ActiveCell down 12 then add up 11 above.... I'd get the address of the ActiveCell, use Offset to move down 11, and
collect that address. Then Offset down one more and set a SUM formula in the
new ActiveCell using the previously-collected addresses. That's probably
not as pretty a way as someone else could do it, but it would work for me.

Then again, if you didn't actually have to move the ActiveCell, you could
probably collect the row and column indexes and use them to set a Range to
the cells you need, then SUM that range and put the result wherever.

HTH
Ed



> ok - now how do i Move ActiveCell down 12 then add up 11 above....
>
>
>
> _________________________________________
>
> Willow: "I knew it! I knew it! Well, not in the sense of having the
> slightest idea, but I knew there was something I didn't know."
>
> http://www.buffyslay.co.uk
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!


 
 
Tom





PostPosted: Tue Jun 22 10:45:16 CDT 2004 Top

Excel Programming >> Move ActiveCell down 12 then add up 11 above....
Sub AAAA()
ActiveCell.Offset(11, 0).Select
ActiveCell.FormulaR1C1 = "=Sum(R[-1]C:R[-11]C)"

End Sub

--
Regards,
Tom Ogilvy




> ok - now how do i Move ActiveCell down 12 then add up 11 above....
>
>
>
> _________________________________________
>
> Willow: "I knew it! I knew it! Well, not in the sense of having the
> slightest idea, but I knew there was something I didn't know."
>
> http://www.buffyslay.co.uk
>
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!