The number can be found with grep and *wc** from the first line of the table, like this for 'commas': The variable 'numc' can then be fed into the 'for' loop: These two steps would go nicely in a shell script, here called 'trans'. I need to know whether 'pivot' in SQL Server can be used for converting rows to columns if there is no aggregate function to be used. Increases your productivity by Select the data you want to transpose, and click Kutools > Range > Transform Range. Select first row in each GROUP BY group? But what would happen when someone ask to pivot table without using pivot function in sql. This article covers a number of techniques for converting all the row values in a column to a single concatenated list. UNPIVOT carries out almost the reverse operation of PIVOT, by rotating columns into rows.Suppose the table produced in the previous example is stored in the database as pvt, and you want to rotate the column identifiers Emp1, Emp2, Emp3, Emp4, and Emp5 into row values that correspond to a particular vendor. 50%, and reduces hundreds of mouse clicks for you every day. Ask Question Asked 3 years, 4 months ago. The mighty text-processing program AWK can also do transposing, but the only commands I've seen are far from simple. SQL Sybase - Convert Rows to Columns. SQL Transpose Multiple Columns to Rows. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Introduction. Ah but there is a little hitch. You can transpose rows to columns and visa versa in a single Sybase SQL statement by using Sybase's characteristic functions and add'l functions. Use the t() function to transpose a matrix or a data frame. Each result is a row. Active 2 years, 7 months ago. Results to: Powered by the KirbyCMS Here's a command used by 'fedorqui' in this Stack Overflow post. Written by co-founder Kasper Langmann, Microsoft Office Specialist.. What I can't figure out is how to actually transpose the columns? #4 paste the below VBA code into the code window.Then clicking “Save” button. #transposecolumntorow Oracle database Unbeatable,Unbreakable Platform.. There are other ways to swap rows and columns in tables, for example using Perl, but for the time being I'm happy with the script! Open and create multiple documents in new tabs of the same window, rather than in new windows. hi i have a query that returns 1 column 5 rows which i want as 1 row 5 columns SELECT columna FROM atable would become?? 1. These include (SIGN, ABS, ISNULL, SUBSTRING, etc) How you combine them depends on what you're trying to do. Yes: If there are blank entries in the table, as there are in 'table2', datamash complains: The solution in datamash version 1.0.6 (the one I got from the Debian 8 repository) is to use the --no-strict option. In our case, we select a range of 5 columns and 4 rows: 3. Sybase specific. © 2013-2017 The Linux Rain 80%, Convert Between Cells Content and Comments, Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier. A verification code will be sent to you. Transpose/Convert columns and rows into single column with VBA code . Ask Question Asked 2 years, 7 months ago. What to show in the new columnsThe value in the new columns must be an aggregate. You can use a decode as a substitute in in Oracle. Transpose/Unzip Function(inverse of zip)? Select three cells which will place the result, for instance, C1:E1, and type this formula =TRANSPOSE(OFFSET($A$1,B1,0,3,1)), and press Shift + Ctrl + Enter keys. In Excel, to transpose some groups of rows to columns, you need to create a unique list, and then extract all matched values of each group. 2,537 Views. Input Table Case exam_id cpt_Seq cpt_code AA 1 1 20 AA 1 … It also allows performing aggregations, wherever required, for column values that are expected in the final output. Transpose rows into columns with undefined counts for the repeating values. Type the TRANSPOSE formula. Problems returning multiple columns… sybase transpose rows to columns (3) Basing my answer on a table of the form: CREATE TABLE tbl (sl_no int , username text , designation text , salary int ); Each row results in a new column to return. Last Modified: 2016-05-27. Sorry for misleading question but I don't know hot to name my issue. Web resources about - SQL: mutiple rows one column to multiple columns one row - sybase.infomaker.general Multiple sequence alignment - Wikipedia, the free encyclopedia A multiple sequence alignment (MSA) is a sequence alignment of three or more biological sequences , generally protein , DNA , or RNA . Choose Single column to range from Transform type;; Specify the cells per row, if you have selected a column with blank cells as separator, you can check Blank cell delimits records, and the data will start a new row at each blank cell.You can also specify the number of cells per row from the Fixed value that you need. Same as the MAX(DECODE()) in oracle. Ever since I wrote Converting multiple rows into a single comma separated row, I was trying to find a SQL command which will do the reverse, which is converting the single comma separated row back to multiple rows.I checked up a few blogs and I found out that it was possible to do with the help of custom functions or stored procedures, but I was not interested in all of them. 1. It's free to sign up and bid on jobs. How to transpose rows into columns in SQL? An example is presented in the next listing. 1) Select the rows for the columns that you want to transpose. So, you select a range of empty cells that occupies the same number of rows as the original table has columns, and the same number of columns as the original table has rows. Each of the rows had only a portion of the result columns filled in (the columns that came from the original row that generated this one). This wouldn't be so bad, but they want the ability to add new rows, which in this case means dynamically adding new columns. Transposing rows and columns is indeed easy if you have the GNU datamashutility on your system: The default separator for columns in datamash is the tab character, so if your table is comma-separated ('commas' table in the following example), you need to specify that separator with a -toption: Note that datamashneeds special instructions if there are blanks anywhere in the table — more on this later. For example, with this tab-separated table (called 'tabbed') as input: get this tab-separated table ('swapped') as output: Transposing rows and columns is indeed easy if you have the GNU datamash utility on your system: The default separator for columns in datamash is the tab character, so if your table is comma-separated ('commas' table in the following example), you need to specify that separator with a -t option: Note that datamash needs special instructions if there are blanks anywhere in the table — more on this later. Add a column with a default value to an existing table in SQL Server ; How to concatenate text from multiple rows into a single text string in SQL server? This small feature can save you time!Check this video with voiceover! Transpose multiple columns into 2 column and single row to multiple , There's a T-SQL construct called UNPIVOT which is designed for this. SQL Server has a PIVOT relational operator to turn the unique values of a specified column from multiple rows into multiple column values in the output (cross-tab), effectively rotating a table. My Table has 5 columns and 2 rows of data but i want to make it as 5 rows and 2 coloumns of data ... , or can it be (much) more Frank. Conversion of Columns into Rows Hi Tom,I have t1 table as followscreate table t1 (mnth varchar2(10), col_1 number, col_2 number, col_3 number, col_4 number, col_5 number);insert into t1 values ('APR-2010',2505.19,5213.35,2625.88,2060.94,11167.73);insert into t1 values ('MAY-2010',3334.27,1889.67,3469 Not a huge table, but big enough to detect speed differences in the methods. The transpose (reversing rows and columns) is perhaps the simplest method of reshaping a dataset. sp_spaceused computes the rowtotal value using the rowcnt built-in function. It puts the whole table in an array before printing the columns as rows: AWK's default column separator is whitespace (including the tab character), so if the separator is a comma you need to specify that: Let's build something from simple shell tools to do this transposing job. Click OK, then the data has been transposed. Transpose Row to Columns - sybase.ase.general. What if we don't know the number of columns, or can't be bothered counting them? Listing 1 Transposing a dataset I found few options to resolve this. It can't be embedded in an SQL Statement. ... How do write a SQL query for data with an undefined number of possible 'row values' to transpose to a column? SQL Server Developer Center Sign in. Inserting multiple rows in a single SQL query? Here is my test SQL so far: #3 click “Insert” ->”Module” to create a new module. In effect i want to utilize the transpose function of excel. Reorganizing data in a spreadsheet can be a pain. Viewed 24k times 5. Click Ok, and select a cell to place the result. See screenshot: 3. you can use "paste special" in excel and select "transpose" to paste clip board rows into excel columns. The article outlines six different ways of doing this utilising loops, the CLR, Common table expressions (CTEs), PIVOT and XML queries. We could probably set an arbitrary upper limit, then hide/show or create/destroy objects in the datawindow as required. Original Version If you have Kutools for Word, with its Transpose Table feature, you can convert columns and rows in a table with only one click. Converting Rows to Columns – PIVOT. Example: ... SQL Server 2000, Sybase 15, Postgres.... so it has to use logic, not pivots etc. UNPIVOT Example. unsing pivot and unpivot query. How to convert columns to rows and rows to columns. See screenshot: 2. Anyway, both AWK and 'trans' will handle blank entries without problems, so let's do a time test again: And once again, AWK and 'trans' give the same output: I wrote 'trans' as throwaway code for transposing my own tables. 1 Solution. But is its output correct? As such, you must identify two additional columns. Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by The actual code is much more complex, with dynamic data and potentially many columns. With a range of blank cells selected, type the Transpose formula: =TRANSPOSE(A1:D5) keys, and that the rows are the cartesian of the distinct keys * the columns being transposed. Mark We can use the cut command to cut out the first column in the table: and the paste command with its -s option ('single line') to make that column into a row: We can loop through all 6 columns in the table with a 'for' loop, doing that cut-and-paste job on each: The cut and paste commands both use the tab character as default separator, so if the table is comma-separated we need to specify that separator for each command with the -d option: That 'for' loop is fine and good, but notice that it specifies the number of columns, 6, in the table. Swapping the rows and columns in a table on the command line would seem to be a fairly easy thing to do. Transpose data from columns to rows [Answered] RSS. ASP.NET Forums / Data Access / Oracle, MySQL, Sybase, Informix and other databases / Transpose data from columns to rows. Tip: In the formula, B1 is the cell next to the first data of the list you use to transposed, 4 indicates the blocks divide data by every three rows and plus one. In the latter case, row names become variable (column) names. jbound asked on 2013-12-02. 10 replies Last post Feb 22, 2011 08:04 PM by Lannie ‹ Previous ... Transpose data from columns to rows. In the Combine Rows Based on Column dialog box, please do the following operations: (1.) Link for all dot net and sql server video tutorial playlistshttp://www.youtube.com/user/kudvenkat/playlistsLink for slides, code samples … 3. #transposecolumntorow Oracle database Unbeatable,Unbreakable Platform.. I need to be able to convert a 9 million row table from rows to columns. sp_spaceused – displays estimates of the number of data pages, space used by a specified table or by all tables in the current database, and the number of rows in the tables. This is why I wrote this question. Sql transpose multiple columns to rows. In essence, transpose the rows to columns. Transpose blocks of data from rows to columns with formula, Transpose blocks of data from rows to columns with Kutools for Excel. Comma delimited data within SQL columns are a PITA to work with! It also allows performing aggregations, wherever required, for column values that are expected in the final output. Hi friends today we will learn how to transpose column data into row of table. This is supposed to replace each blank entry with a string, and the default string is 'N/A'. No problem. 1. With the following VBA code, you can also join the multiple columns and rows into a single column. Once you have received the verification code, you will be able to choose a new password for your account. For example a table might contain 8 rows which requires converting to a single comma separated string containing the 8 values. Lets say I have multiple currencies in a table and I would like to display in a single comma separated rows. To use this you need three things: 1. Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. I'll feed the name of the table to be transposed into the script as the the first argument ($1) for the 'trans' command: What if the separator isn't a comma? How to I convert columns to rows in Sybase. My columns are string data type and I need to convert this row data to column data. With a dynamic return type like this, it's hardly possible to make this completely dynamic with a … The column that has the values defining the new columns 2. Convert columns to rows using Paste Special. Any limitation in size for return result from SELECT? My Table has 5 columns and 2 rows of data but i want to make it as 5 rows and 2 coloumns of data ... , or can it be (much) more Frank. The requirement is I have a table like this , considering a … For example: declare @t table (ProductID int, Type varchar(20), Name varchar(20), isAvailable bit) insert into @t select 1, 'Type1', 'Product1',1 union select 2, 'Type1', 'Product2',0 union select 3, 'Type2', 'Product3',1 union select 4, 'Type2', 'Product4',0. See screenshot: Tip: in the formula, A1 is the first cell of the data list, B1 is the blank cell next to the data, 3 means block by every three data. After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!). – ypercubeᵀᴹ Apr 21 '16 at 10:18 This one is applicable for sql server only for other databases we can use inner query within the select statement. pivot columns with transpose sybase rows row postgresql db2 data PostgreSQL row to columns I'm trying to create a dynamic system that allows the users to import lists of data from Excel so I need to have dynamic columns, ex: custom_columns_table id list_id data_type column_name d… See screenshot: 4. Choose Single column to range from Transform type;; Specify the cells per row, if you have selected a column with blank cells as separator, you can check Blank cell delimits records, and the data will start a new row at each blank cell.You can also specify the number of cells per row from the Fixed value that you need. Place a pivot clause containing these items after the table name, like so:So to … Click another column that you want to transpose, and click Combine then choose one separator to separate the combined data, such as space, comma, semicolon. We use pivot queries when we need to transform data from row-level to columnar data. The XML option to transposing rows into columns is basically an optimal version of the PIVOT in that it addresses the dynamic column limitation. Oracle Database 11g introduced the pivot operator. Please let me know if anyone has an efficient way of transposing the table in the opposite direction to the example above. Because there's whitespace within data items in 'table1', I'll need to specify a tab character as separator for AWK. The code in the answer uses OUTER APPLY and TOP so it it will work in SQL Server only (and Sybase) which do not have LIMIT. It's a heck of a lot easier to reformat separate rows into comma separated values on the odd occasion you need it than to work with them all the time. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window. Kutools for Excel , with more than 300 handy functions, makes your jobs more easier. We can find the number of columns ('numc') by adding 1 to the number of separators with BASH arithmetic. Use SQL within group for moving rows onto one line and listagg to display multiple column values in a single column; In Oracle 11g, we have the within group SQL clause to pivot multiple rows onto a single row. Transpose. Transposing Rows and Columns Is there an easy way to set up a bound data grid to display each row from my table in columns on the screen ( with, of course the rows corresponding to the columns in the data). It could be extended so that argument 2 specifies the input column separator, and argument 3 a different column separator for the output. Pivoting. This makes switching rows to columns easy. See screenshot: If the above formulas are complex for you, you can have a try on the Transform Range feature of Kutools for Excel. But in my experience, you'll have more luck with APPLY as per my code below: SELECT SQL Transpose multiple columns into rows [duplicate] Ask Question Asked 6 years, 8 months ago. Click the column name that you want to transpose data based on, and select Primary Key; (2.) 3.In the Transform Range dialog box, specify the settings as follows:. Looks like our shell script 'trans' is the winner. How to I convert columns to rows in Sybase. Converting Rows to Columns – PIVOT SQL Server has a PIVOT relational operator to turn the unique values of a specified column from multiple rows into multiple column values in the output (cross-tab), effectively rotating a table. My db<>fiidle is here. For example, count, sum, min, etc. You can do this by either clicking the first one and dragging through the rest or clicking the first one, holding down the Shift key, and then clicking the last one. I was preparing a statistical report and was stuck in one place where I needed to convert certain rows to comma separated values and put into a single row. Sub transposeColumns() Dim R1 As Range Dim R2 As Range Dim R3 As Range Dim RowN As Integer wTitle = "transpose multiple Columns" Set R1 = Application.Selection Set R1 = Application.InputBox("please select the Source data of Ranges:", … Excel 2013 tutorial - How to Convert Rows to Columns with Transpose in Excel 2013. make sure your actual table is in the quotes and change the double quotes to 'single' quotes. Follow along with Rob Gravelle as he creates a crosstab query for the Sakila sample database that counts the number of movie rentals for each customer aggregated by month. What these defining values are 3. turning rows into columns (or columns into rows). In the cell B2, type this formula, =B1+4, and drag the auto fill handle down to cells needed this formula. I want to transpose rows to columns Query goes like this create table #a ( col1 int, col2 char (1) ) go Insert into #a values (1,"a") Insert into #a values (1,"b") Insert into #a values (1,"c") Insert into #a values (1,"d") Insert into #a values (2,"a") Insert into #a values (2,"b") Insert into #a values (3,"a") Insert into #a values (3,"b") Insert into #a values (3,"c") Insert into #a values (3,"d") Insert into #a values … Unfortunately, this doesn't work: This was a known bug in version 1.0.6 and is said to have been fixed in the next datamash version. (2 rows) 여기서는 sum을 사용했지만 경우에 따라 count, max, min 등의 다른 Aggregate 함수를 사용해야 할 수도 있다. Transpose Row to Columns I want to transpose rows to columns Query goes like this create table #a ( col1 int, col2 char(1) ) go Insert into #a values(1,"a") Insert into #a values(1,"b") Insert into #a values(1,"c") Insert into #a values(1,"d") Insert into #a values(2,"a") Insert into #a values(2,"b") Insert into #a values(3,"a") Insert into #a values(3,"b") Insert into #a values(3,"c") Insert into #a values(3,"d") … You see our first pivot query generated two rows, with six columns not one row with six columns. Convert column into rows without using pivot function in SQL. Sql server transpose rows to columns dynamically without pivot. 1. Click Insert > Module, and paste the following code in the Module window. Can be a pain distinct keys * the columns being transposed what we want is a single comma separated containing. 3.In the Transform Range dialog box, please do as below: (Free Download Kutools for Now... Arbitrary upper limit, then hide/show or create/destroy objects in the Module window of zip ) n't know hot name... A matrix or a data frame 8 rows which requires converting to column! Received the verification code, you must identify two additional columns [ Answered ] RSS wanted to fetch rows... 1. … Sybase specific hundreds of mouse clicks for you every day... transpose data from to. Can also join the multiple columns to rows in Sybase, Informix and other countries password for your account /. Question Asked 2 years, 4 months ago specify a tab character as separator for the repeating values row. Marketplace with 18m+ jobs every day have direct SQL mechanism for non first-normal form SQL.! Table like this, considering a … Sybase specific count, sum, min 등의 aggregate. For you every day the Microsoft Visual Basic for Applications window from columns to rows in Sybase in... Columns into rows ) 여기서는 sum을 사용했지만 경우에 따라 count, MAX, min 등의 다른 aggregate 함수를 í•... String data type and I need to Transform data from columns to rows it also allows performing aggregations wherever... Million row table from rows to columns we use pivot queries when we need to Transform data row-level. Test, I 'll use a DECODE as a substitute in in Oracle bob Mesibov is Tasmanian, retired a! Me know if anyone has an efficient way of transposing the table in the Range! Performing aggregations, wherever required, for column values that are expected in the U.S. and other /. Set an arbitrary upper limit, then hide/show or create/destroy objects in the opposite direction to the number of,...:... SQL Server transpose rows to columns with Kutools for Excel, please do as below screenshot?! 4 paste the below VBA code, you must identify two additional columns 08:04 PM by ‹. Tabs of the same window, rather than in new tabs of the same window, than... Column dialog box, specify the settings as follows: quotes and change the double quotes to '... Example a table like this, considering a … Sybase specific 'row values ' to transpose a or! Linux Rain Powered by the KirbyCMS Linux® is the transformation of rows of data from rows to.... Shell script 'trans ' is the transformation of rows of data from rows to columns without the blocks as:! Any limitation in size for return result from select string is ' N/A ' Transform from. N'T be bothered counting them your actual table is in the final output ' quotes and single row to,! Contains values filled in for all columns able to convert rows to columns transposing the table in the Range! In 60 days ) ) in Oracle once you have received the verification code, you use!, row names become variable ( column ) names do n't know hot name!, for column values that are expected in the new columnsThe value the... Data items in 'table1 ', I introduce some tricks on handling this job quickly and in... Marketplace with 18m+ jobs line would seem to be a fairly easy thing to do a,! String containing the 8 values, Unbreakable Platform.. SQL transpose multiple columns rows... Oracle database Unbeatable, Unbreakable Platform.. SQL transpose multiple columns and 10004 rows of 5 columns and rows! Are trademarks or registered trademarks of Microsoft Corporation in the new columnsThe value in the and... Below VBA code, you must identify two additional columns data Based on column dialog box, specify settings., the case keyword is for scripting use a pain world 's largest freelancing marketplace with 18m+.... From rows to columns.... so it has to use this you need three things: 1. is! Our case, we select a cell to place the result of an aggregation on two or fields... 15 columns and rows into Excel columns a Range of 5 columns and 10004 rows in new windows for! What I ca n't figure out is how to transpose a matrix or a data frame sybase transpose rows to columns examples with function. Overflow post know if anyone has an efficient way of transposing the table in Word with Kutools for Now. Transposing the table in the Current table paste special '' in Excel: Turn rows into columns with Kutools Excel! Oracle database Unbeatable, Unbreakable Platform.. SQL transpose multiple columns into rows ) delimited data within SQL are. Sorry for misleading Question but I do n't know hot to name my issue in a spreadsheet can be fairly! Value in the quotes and change the double quotes to 'single ' quotes to use logic, not etc. From row-level to columnar data rowtotal value using the rowcnt built-in function new columns 2. a. (Free Download Kutools for Word: with more than 100 handy Word add-ins, free to with. Select a cell to place the result find the number of columns, sybase transpose rows to columns ca n't be bothered counting?! Excel transpose or hire on the world 's largest freelancing marketplace with 18m+ jobs multiple... Years, 7 months ago Liju Transpose/Unzip function ( inverse of zip ) what would happen when ask. =B1+4, and that the rows are the cartesian of the same window rather. To generate this code manually, and click Kutools > Range > Transform Range dialog box specify. Are the cartesian of the distinct keys * the columns being transposed for AWK separated. In SQL complex, with more than 300 handy functions, makes your jobs more easier SQL transpose multiple into... Being transposed rowcnt built-in function mouse clicks for you every day is designed for this for!, then the data has been transposed called 'table1 ', I introduce some on... Transpose column data into row of table in the final output than in new windows tutorial - to. The datawindow as required search for jobs related to Python Excel transpose or on! 'S tedious to generate this code manually, and drag the auto fill handle down to cells this! Try with no limitation in 60 days freelancing marketplace with 18m+ jobs,. 2 years, 4 months ago of query is the transformation of of. Kasper Langmann, Microsoft Office Specialist of transposing the table in the quotes and change the double quotes 'single. A DECODE as a substitute in in Oracle two additional columns containing the 8 values items in 'table1,! Using pivot function in SQL hi friends today we will learn how to I columns. Is used to display in a single row to multiple, there a. A cross tabulation query is the winner size for return result from select method of reshaping dataset. ) ) in Oracle... SQL Server 2000, Sybase, Informix and databases.: E1, drag auto fill handle down to cells needed this formula for AWK hi friends today will. Mesibov is Tasmanian, retired and a keen Linux tinkerer wanted to fetch the rows columns! Aggregation on two or more fields new columns 2. will be able to convert columns to rows sybase transpose rows to columns... Kutools fro Word Excel 2013 data from columns to rows and rows to columns perhaps the simplest method of a. What would happen when someone ask to pivot table without using pivot function in SQL, required! English ) 3.in the Transform Range lets say I have a table on the world largest! The multiple columns and rows into a single row to multiple, there whitespace! Turning rows into a single row that contains values filled in for all columns column data into row of.... Separated string containing the 8 values I 've seen are far from simple DECODE!, 7 months ago has an efficient way of transposing the table in Word with Kutools Word... For scripting use numerical result for each month in the new columnsThe value the!, MAX, min 등의 다른 aggregate 함수를 사용해야 í• ìˆ˜ë„ 있다 makes. Received the verification code, you must identify two additional columns join the multiple columns into 2 column single! Be bothered counting them aggregation on two or more fields Range > Transform Range box! N'T know the number of columns ( or columns into rows ) 여기서는 sum을 사용했지만 경우에 count! From select a Range of 5 columns and rows into columns with formula, =B1+4, reduces... Tasmanian, retired and a keen Linux tinkerer single column with VBA code sure your actual table is in sybase transpose rows to columns! We will learn how to I convert columns to rows in Sybase with the following operations: ( 1 )... Some tricks on handling this job quickly and easily in Excel: Turn rows into a single comma string...: with more than 300 handy functions, makes your jobs more easier U.S. and countries. The rowtotal value using the rowcnt built-in function is I have a table and I would like display... For you every day convert a 9 million row table from rows to columns dynamically pivot. Are string data type and I need to specify a tab character as separator for the repeating values for account... Is I have a table might contain 8 rows which requires converting to a single.! ; ( 2 rows ) 여기서는 sum을 사용했지만 경우에 따라 count, sum, min etc... Or registered trademarks of Microsoft Corporation in the opposite direction to the example above,!, drag auto fill handle down to cells needed this formula, =B1+4, and the logo. ̈˜Ë„ 있다 등의 다른 aggregate 함수를 사용해야 í• ìˆ˜ë„ 있다 ; does this require a stored procedure first... ', I 'll use a tab-separated data table called 'table1 ', I introduce some tricks handling! Count, MAX, min, etc formulas to solve this problem 100 handy Word add-ins, free to up! > Transform Range dialog box, specify the settings as follows: not!