5

Yes, I still use Lotus 1-2-3 Release 2.4 on my HP 200LX. Anybody know of a good way to do something like insert row (/wir), but only across a subset of columns? In other words, kind of like inserting a range of cells in Excel, and choosing shift cells down.

I know you could do something like /m{r X}{end}{d}~{d}~ (where you intend to move X+1 columns), but the {end}{d} step wouldn't guarantee that you're moving everything below the insertion point (if would stop at the next blank cell).

I'm open to clever macros, or (readily available) add-ins.

1
  • 3
    I'm going to remove that specific version tag - at least until we have more questions about the software.
    – wizzwizz4
    Jun 28, 2017 at 19:22

1 Answer 1

2

Well, I managed to put together something workable. There are two functions: {INSDOWN} and {DELUP} that work like Excel's insert/delete with shifting cells down/up. You can do a whole range, and it will vacate/remove the cells across all the included rows and columns.

The two functions, {INSDOWN} and {DELUP}, take a range name as their sole argument. This can either be a range name (e.g. NEWROW) or absolute addresses (e.g. A4..C8).

There are also Alt-I and Alt-D macros that allow for interactive insertion/deletion. Move to a corner of the range, hit the macro hotkey to begin the range selection, move to the opposite corner, and hit Enter.

Make sure you don't use these macros to insert/delete cells located above the macros themselves, or things will get a bit weird. :)

Here's the macro text via print-to-file with the list cell formulas option (and a tiny bit of manual formatting for readability). Make sure you /rnlr the stuff in column A to set up the appropriate range names.

A1: 'ROWNUM
A3: 'NEXTROWNUM
A5: 'STARTCOLNUM
A6: 'STARTCOL
    B6: @IF(STARTCOLNUM>26,@CHAR(@INT(STARTCOLNUM/26)+64),"")&@CHAR(@MOD(STARTCOLNUM,26)+64)
A8: 'ENDCOLNUM
A9: 'ENDCOL
    B9: @IF(ENDCOLNUM>26,@CHAR(@INT(ENDCOLNUM/26)+64),"")&@CHAR(@MOD(ENDCOLNUM,26)+64)
A11: 'INSRANGE
    B11: 'INSPOINT
A13: 'SETUPINSRANGE
    B13: '{PUT ROWNUM,0,0,@STRING(@CELL("row",@@(INSRANGE)),0)}
    B14: '{PUT NEXTROWNUM,0,0,@STRING(@CELL("row",@@(INSRANGE))+@ROWS(@@(INSRANGE)),0)}
    B15: '{PUT STARTCOLNUM,0,0,@CELL("col",@@(INSRANGE))}
    B16: '{PUT ENDCOLNUM,0,0,@CELL("col",@@(INSRANGE))+@COLS(@@(INSRANGE))-1}
A18: 'INSDOWN
    B18: '{DEFINE INSRANGE:S}
    B19: '{SETUPINSRANGE}
    B20: '{CALC}
    B21: '/m{STARTCOL}{ROWNUM}..{ENDCOL}8192~
    B22: '{STARTCOL}{NEXTROWNUM}~
A24: '\I
    B24: '{ABS}{?}{woff}~
    B25: '/rncINSPOINT~{ESC}
    B26: '{INSDOWN INSPOINT}
    B27: '/rndINSPOINT~{won}
A29: 'DELUP
    B29: '{DEFINE INSRANGE:S}
    B30: '{SETUPINSRANGE}
    B31: '{CALC}
    B32: '/m{STARTCOL}{NEXTROWNUM}..{ENDCOL}8192~
    B33: '{STARTCOL}{ROWNUM}~
A35: '\D
    B35: '{ABS}{?}{woff}~
    B36: '/rncINSPOINT~{ESC}
    B37: '{DELUP INSPOINT}
    B38: '/rndINSPOINT~{won}
A40: 'woff
    B40: '{WINDOWSOFF}{PANELOFF}
A42: 'won
    B42: '{WINDOWSON}{PANELON}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .