EXCEL: How to merge cells with certain values -



EXCEL: How to merge cells with certain values -

i have table on excel

http://i.stack.imgur.com/n2kds.png

and want create looks this, column, because have lot of rows.

http://i.stack.imgur.com/1v0te.png

1- save spreadsheet enabling macros. (save .xlsm) 2- open view tab, click on macros, view macros , edit 3- paste next code:

sub macro0() 'i assume info in column range("a1:a65000") 'i assume categories start word category 'if not case have define list gategories set c = .find("gategory", lookin:=xlvalues) if not c nil firstaddress = c.address onebefore = firstaddress - 1 range("a1", onebefore).select selection.merge set c = .findnext(c) loop while not c nil , c.address <> firstaddress end if end end sub

please note comments in code. allow me know if worked you.

source: http://msdn.microsoft.com/en-us/library/office/ff839746%28v=office.15%29.aspx

excel

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Php operator `break` doesn't stop while -