Merging using Modifiers

If you've worked in Microsoft Excel, you may be familiar with merging. If you select a range in Excel and click Merge, Excel will merge your selection into one big cell. The merged cells will then display whatever the text was in the top left cell and delete everything else in your selection.

Grunt's merging is mostly similar to how Excel works, but there are some important differences. First, Grunt doesn't delete the underlying data when you merge, it just hides it. In other words, Grunt will merge the structure of your Visual Grid, but keep the data intact. Second, Grunt has several different merge modes, meaning it can be a bit smarter about how it merges cells.

Default merge preserves the top left value

 When you merge to cells together, Grunt's default mode is to set the content of the top left cell as the content of the merged cell. In the example below the first row is merged, and you can see how the A from the top left corner is kept visible. 

2019-06-28_09_37_43-Window.png    2019-06-28_09_42_22-Window.png

Similar Values
2019-06-28_09_50_25-Window.png  

If you instead want to merge neighboring/adjacent cells that contain the same value, you select Similar values mode. This is great if you have pivot data or data where you've repeated text several times and want to merge it into one. 

2019-06-28_09_37_43-Window.png      2019-06-28_09_46_09-Window.png

Empty cells

The Empty cells-function is somewhat similar to Excel's Center across selection. It basically means that if you switch to that mode, the left, top-most cell will merge with any adjacent empty cells. This is useful if you just write some text in a cell somewhere and want to merge with surrounding cells.

2019-06-28_09_37_43-Window.png       2019-06-28_09_53_06-Window.png

Direction

2019-06-28_09_47_33-Window.png

Merge behavior can be quite complex, and you may have noticed Grunt has an extra merge property called Direction. Sometimes, merging Similar values or Empty cells means Grunt has a choice of merging in several directions. The Direction property lets Grunt know which direction it then should prioritize.  The default Direction setting is Rows, then columns.  If you switch the Direction mode to Columns, then rows the cells will merge downwards to cells in the same column instead. 

Original:

2019-06-28_09_37_43-Window.png

Rows, then columns:                         Columns, then rows: 

2019-06-28_09_53_06-Window.png         2019-06-28_09_58_34-Window.png

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.