Article View: comp.sys.mac
Article #4034Re: Excel: help me extend a selection in a macro?
From: Neil Hoopman
Date: Tue, 05 Sep 1989 08:14
Date: Tue, 05 Sep 1989 08:14
29 lines
1794 bytes
1794 bytes
In article <951@kosman.UUCP> kevin@kosman.UUCP (Kevin O'Gorman) writes:
>[Description of specific problem deleted]
>I know that what I want to do is add a row to the range I had before. I can
>name the range or any of its corners easily enough because it's just two
>columns and I have to know the top and bottom anyway.
>
>It seems this should be easy, but it's not.
>
>Help, please, anyone who has hacked the macro language already!!
Some of the other macro pros might be able to do this
more elegantly; playing around with Excel, this is what I came
up with:
=SELECT("rc:r["&ROWS(SELECTION())&"]c["&COLUMNS(SELECTION())-1&"]")
This statement expands the current selection by one row.
It's also an example of how to concatentate in a select statement;
a useful thing to know!
Have fun!
----------------------------------------------------------------------------
Neil Hoopman - Microsoft Corp. uunet!microsoft!neilh
------------------------------ microsoft!neilh@uunet.UU.NET
"Carpe Diem. Seize the day. microsoft!neilh@beaver.cs.washington.edu
Make your lives extraordinary." ----------------------------------------
- Dead Poets Society Neil? Neil who? Posted what? When?
----------------------------------------------------------------------------
Technical Details
Message-ID:
<7602@microsoft.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!cs.utexas.edu!uunet!microsoft!neilhReferences:
<951@kosman.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!cs.utexas.edu!uunet!microsoft!neilh From: neilh@microsoft.UUCP (Neil Hoopman) Newsgroups: comp.sys.mac Subject: Re: Excel: help me extend a selection in a macro? Message-ID: <7602@microsoft.UUCP> Date: 5 Sep 89 08:14:35 GMT References: <951@kosman.UUCP> Reply-To: neilh@microsoft.UUCP (Neil Hoopman) Organization: Microsoft Corp., Redmond WA Lines: 29