I have a table with columns partner
, id
, email
, status
, type
, group
, details
. There are duplicate values in the columns id
, email
, status
, type
, group
.
<!-- language: lang-none --> | partner | id | email | status | type | group | details | |---------|-----------|---------------------|--------|------|-------|----------------------| | YESTKBW | Wednesday | wednesday@gmail.com | YES | 0 | 11 | kgplqolgbmdxenwpehyn | | ZBSDCUY | Wednesday | wednesday@gmail.com | YES | 0 | 11 | upujkpekm tmqfzpca | | RBGBHNK | Wednesday | wednesday@gmail.com | YES | 0 | 11 | iky k gtlffdyukngwlo | | UXJGHLW | Saturday | saturday@gmail.com | NO | 0 | 11 | mjdmodggygxkydxifxny | | UZHNECM | Friday | friday@gmail.com | YES | 1 | 22 | wpboajbemueskbuyjqeg | | XACTUOK | Tuesday | tuesday@gmail.com | NO | 2 | 33 | rxnwkpmegng bobjdqlz | | EIOBZXS | Tuesday | tuesday@gmail.com | NO | 2 | 33 | rwqxxwoeanxqsbpbwx j |
I'm trying to make a script that will, with the same consecutive id values, merge cells in the columns id
, email
, status
, type
, group
. Values partner
and details
do not need to touch.
An example of what should happen
<!-- language: lang-none --> | partner | id | email | status | type | group | details | |---------|-----------|---------------------|--------|------|-------|----------------------| | YESTKBW | Wednesday | wednesday@gmail.com | YES | 0 | 11 | kgplqolgbmdxenwpehyn | | ZBSDCUY | | | | | | upujkpekm tmqfzpca | | RBGBHNK | | | | | | iky k gtlffdyukngwlo | | UXJGHLW | Saturday | saturday@gmail.com | NO | 0 | 11 | mjdmodggygxkydxifxny | | UZHNECM | Friday | friday@gmail.com | YES | 1 | 22 | wpboajbemueskbuyjqeg | | XACTUOK | Tuesday | tuesday@gmail.com | NO | 2 | 33 | rxnwkpmegng bobjdqlz | | EIOBZXS | | | | | | rwqxxwoeanxqsbpbwx j |
I understand that it is necessary to use the Range
class's mergeVertically()
method, but I do not have enough experience to solve this problem.