kevin@kosman.UUCP (Kevin O'Gorman) (09/01/89)
I'm trying to write a macro in this much-touted macro language. Most things are fine, and I can use the recorder for lots of stuff, but I've bumped into something I can't quite figure out. I have some data that I want to chart. Every week I add a new data point. I have arranged the stuff so that making the chart is easy. I have a name for the last point, and I have the macro go there and fool around to create the new data point using relative motion. Now I want to create the chart afresh, and I cannot for the life of me figure out how to select the new larger chart region. a) If I record what happens when I select the old chart and type shift-downarrow, I get =select(some absolute stuff), which does me no good. The form of the absolute stuff depends on whether references are absolute or not, but it's still fixed. b) I have not found an acceptable syntax to the select function which mixes the current point and a named point (I could do that) or two named points (I could do that too) though I tried harder on the first. 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!!
neilh@microsoft.UUCP (Neil Hoopman) (09/05/89)
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? ----------------------------------------------------------------------------