项目作者: freginold

项目描述 :
Excel macro to separate line-delimited values in one cell into individual cells
高级语言: Visual Basic
项目地址: git://github.com/freginold/unmerger.git
创建时间: 2017-02-27T19:14:47Z
项目社区:https://github.com/freginold/unmerger

开源协议:Other

下载


unmerger

unmerger is an Excel macro to separate line-delimited values in one cell into their own individual cells, without breaking up the formatting of the preceeding cells in the row. Here is an example of what this macro does:

screen shot

Usage:

To use this function, copy the text in the .vbs file and save it as a macro in your Excel spreadsheet, then either run it from the ribbon (Developer > Macros > Run) or assign it a shortcut key.

Cells to the left of the affected cell will retain their row height and formatting. Cells to the right will also retain their row height and formatting, until three empty cells in a row are passed; then all subsequent cells will take on the row height of the affected cell. That value can be adjusted by changing the line Do Until empties > 2 to replace 2 with the maximum number of adjacent empty cells, minus 1.

Limitations / Warnings:

  • Because it’s a macro, this action can’t be undone with CTRL Z. It’s a good idea to save your worksheet before trying this function.
  • Using this macro on multiple columns in the same row will probably not work as expected. It’s best to not use it more than once on the same row.

Tested successfully in:

  • Excel 2007 / Windows Vista
  • Excel 2007 / Windows 7
  • Excel 2013 / Windows 7