excel - Concatenate 1000 cells of column to one cell at the bottom -
excel - Concatenate 1000 cells of column to one cell at the bottom -
i want combine text of 1000 cells of particular column (say a1 a1000) 1 single cell (say a1001), can tell macro this?
try next udf
public function concat(r range) string concat = "" each rr in r concat = concat & rr.value next rr end function
user defined functions (udfs) easy install , use:
alt-f11 brings vbe window alt-i alt-m opens fresh module paste stuff in , close vbe windowif save workbook, udf saved it. if using version of excel later 2003, must save file .xlsm rather .xlsx
to remove udf:
bring vbe window above clear code out close vbe windowto utilize udf excel:
=concat(a1:a1000)
to larn more macros in general, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
and
http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx
and
http://www.cpearson.com/excel/writingfunctionsinvba.aspx
for specifics on udfs
macros must enabled work!
excel
Comments
Post a Comment