Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You and Your Team.

Learn More →

Width Macro for 123

Width Macro for 123 Joh n Gustafson HIS MACRO can be used to duplicate cell widths. Fre­ the first cell is th e label of the range. The range extends below quently I find a need to duplicate the cell widths in a par­ this for the number of cells neede d for the table. Tallel set of columns. In a large worksheet this task can be You should now have two ranges: tedious at best. These macros will first place the original cell ORG WORKSHEET widths in a table an d then use this table to duplicate the cell WIDTH TABLE widths to the secondary area of th e worksheet. Set this macro u p Name the rest of the macro ranges with /RNLR. You must name in an unused worksheet first to see ho w it operates and t o get the ranges at B9 "\A" and B15 "\B " manually. These are the your cell relationships correct. Copy th e following cell entries ex­ macro names. You should now have the following named ranges: actly as they are shown in fig. 1. COUNT Select a number of cells to represent an original worksheet B23 MAX and name them "ORG WORKSHEET". Set the cell widths in this B24 ORG WORKSHEET range to different values so you can see the cell widths change when the macro executes. Whatever range you have selected: Go t o the unused part of your worksheet with plenty of room SETW1DTH B17 and name a range "WIDTH TABLE" with enough cells for the num­ WIDTH B11 ber of columns in th e range you name "ORG WORKSHEET". Take WIDTH VALUE B21 \A B9 care in defining the "WIDTH TABLE" starting location so that the \B B15 proper values are referenced in cells B12 and B21. The macro is setup so that, if you place your "WIDTH TABLE" below the macro, To execute the macros, place the cursor in the upper left cell of the range named "ORG A7: 'Set column widths WORKSHEET". Invoke macro A. Th e cellpointer will move right across your A9: 'Alt A worksheet to th e right edge of the range de­ B9:'{FORCOUNT,1,@CELL("CONTENTS",B12), fined by the "ORG WORKSHEET" range, 1,WIDTH} placing the width values of the columns in the "WIDTH TABLE" range. A11: 'WIDTH Next, place the cellpointer in the col­ B11: '{IF COUNT=MAX}{QUIT} umn where you want the new worksheet to B12:'{PUTWIDTHTABLE,0,COUNT1, begin. Invoke macro B. The cellpointer will move right across your worksheet the @CELLPOINTER("WIDTH")}{CALC} number of columns defined by th e "ORG B13: '{RIGHT} WORKSHEET" using the values in the A15:'ALT B "WIDTH TABLE". B15:'{CALC}{FORCOUNT,1,@CELL("CONTENTS",B12), A Secondar y Use 1,SETWIDTH} If you know how you want your worksheet A17: 'SET WIDTH set up , you can create a cell width table and B17: '{CALC} {IF WIDTH VALUE=0}{QUIT} then have the macro B set the cell widths. B18:@LEFT(COMMAND STRING,5)& Save this as a separate worksheet or combine this with the macro library. When @STRING(WIDTH VALUE,0)&"~" you use them in subsequent worksheets, B19: '{RIGHT} you only need to combine them, name A21: 'WIDT H VALUE them "ORG WORKSHEET" and "WIDTH B21: @INDEX(WIDTH TABLE,0,COUNT) TABLE", perform /RNLR (Range Name Labels Right) and give the beginning cells a A22: 'COMMAND STRING macro name. B22: '/WCS A23: 'COUNT A24: 'MAX Reprinted with permission from GS-BUG B24: @COLS(ORG WORKSHEET) and the Columbus Computer Society Newsletter 5(0:16 (June 1990). Fig. 1 Lotus 1-2-3 macro for cell widt h table OCLC Micro Vol. 6, No. A August 1990 35 http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png OCLC Micro Emerald Publishing

Width Macro for 123

OCLC Micro , Volume 6 (4): 1 – Apr 1, 1990

Loading next page...
 
/lp/emerald-publishing/width-macro-for-123-WmQzkf1GgO
Publisher
Emerald Publishing
Copyright
Copyright © Emerald Group Publishing Limited
ISSN
8756-5196
DOI
10.1108/eb055949
Publisher site
See Article on Publisher Site

Abstract

Joh n Gustafson HIS MACRO can be used to duplicate cell widths. Fre­ the first cell is th e label of the range. The range extends below quently I find a need to duplicate the cell widths in a par­ this for the number of cells neede d for the table. Tallel set of columns. In a large worksheet this task can be You should now have two ranges: tedious at best. These macros will first place the original cell ORG WORKSHEET widths in a table an d then use this table to duplicate the cell WIDTH TABLE widths to the secondary area of th e worksheet. Set this macro u p Name the rest of the macro ranges with /RNLR. You must name in an unused worksheet first to see ho w it operates and t o get the ranges at B9 "\A" and B15 "\B " manually. These are the your cell relationships correct. Copy th e following cell entries ex­ macro names. You should now have the following named ranges: actly as they are shown in fig. 1. COUNT Select a number of cells to represent an original worksheet B23 MAX and name them "ORG WORKSHEET". Set the cell widths in this B24 ORG WORKSHEET range to different values so you can see the cell widths change when the macro executes. Whatever range you have selected: Go t o the unused part of your worksheet with plenty of room SETW1DTH B17 and name a range "WIDTH TABLE" with enough cells for the num­ WIDTH B11 ber of columns in th e range you name "ORG WORKSHEET". Take WIDTH VALUE B21 \A B9 care in defining the "WIDTH TABLE" starting location so that the \B B15 proper values are referenced in cells B12 and B21. The macro is setup so that, if you place your "WIDTH TABLE" below the macro, To execute the macros, place the cursor in the upper left cell of the range named "ORG A7: 'Set column widths WORKSHEET". Invoke macro A. Th e cellpointer will move right across your A9: 'Alt A worksheet to th e right edge of the range de­ B9:'{FORCOUNT,1,@CELL("CONTENTS",B12), fined by the "ORG WORKSHEET" range, 1,WIDTH} placing the width values of the columns in the "WIDTH TABLE" range. A11: 'WIDTH Next, place the cellpointer in the col­ B11: '{IF COUNT=MAX}{QUIT} umn where you want the new worksheet to B12:'{PUTWIDTHTABLE,0,COUNT1, begin. Invoke macro B. The cellpointer will move right across your worksheet the @CELLPOINTER("WIDTH")}{CALC} number of columns defined by th e "ORG B13: '{RIGHT} WORKSHEET" using the values in the A15:'ALT B "WIDTH TABLE". B15:'{CALC}{FORCOUNT,1,@CELL("CONTENTS",B12), A Secondar y Use 1,SETWIDTH} If you know how you want your worksheet A17: 'SET WIDTH set up , you can create a cell width table and B17: '{CALC} {IF WIDTH VALUE=0}{QUIT} then have the macro B set the cell widths. B18:@LEFT(COMMAND STRING,5)& Save this as a separate worksheet or combine this with the macro library. When @STRING(WIDTH VALUE,0)&"~" you use them in subsequent worksheets, B19: '{RIGHT} you only need to combine them, name A21: 'WIDT H VALUE them "ORG WORKSHEET" and "WIDTH B21: @INDEX(WIDTH TABLE,0,COUNT) TABLE", perform /RNLR (Range Name Labels Right) and give the beginning cells a A22: 'COMMAND STRING macro name. B22: '/WCS A23: 'COUNT A24: 'MAX Reprinted with permission from GS-BUG B24: @COLS(ORG WORKSHEET) and the Columbus Computer Society Newsletter 5(0:16 (June 1990). Fig. 1 Lotus 1-2-3 macro for cell widt h table OCLC Micro Vol. 6, No. A August 1990 35

Journal

OCLC MicroEmerald Publishing

Published: Apr 1, 1990

There are no references for this article.