Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Good to hear.
Thanks for the feedback. Gord On Thu, 10 Sep 2009 15:31:01 -0700, CSchwass wrote: Works perfectly, thanks! "Gord Dibben" wrote: With your workbook currently open................. Alt + F11 to open VBE CTRL + r to open Project Explorer Select your workbook/project and Right-clickInsertModule Paste the UDF into that module. Alt + q to return to the Excel window. Enter the formula into a sheet cell. Gord On Wed, 9 Sep 2009 15:19:01 -0700, CSchwass wrote: Gord, I am familiar with macros but not UDFs. How do I paste this to a "general module"? Thanks, Chris "Gord Dibben" wrote: Copy/paste this UDF to a general module in your workbook. Function ConCatRange(CellBlock As Range) As String 'for non-contiguous cells =ccr((a1:a10,c4,c6,e1:e5)) Dim Cell As Range Dim sbuf As String For Each Cell In CellBlock If Len(Cell.text) 0 Then sbuf = sbuf & Cell.text & "," Next ConCatRange = Left(sbuf, Len(sbuf) - 1) End Function This UDF ignores blank cells so you can make the range quite large to accomodate future entries in column A =concatrange(A1:A100) Please note: Excel will truncate the contents after about 1024 characters Gord Dibben MS Excel MVP On Wed, 9 Sep 2009 09:20:03 -0700, CSchwass wrote: I have a list like this in column A: 2345 1023 1492 2985 2902 etc ...but much longer. I want this result in one cell: 2345,1023,1492,2985,2902,etc I will continually add to the list in Column A and I don't want to update the formula every time for the CSV cell. How can I do this? Thanks, Chris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need a formula to 'find' word in cells of column from a long list | Excel Worksheet Functions | |||
Transpose after CONCATENATE | Excel Worksheet Functions | |||
Transpose several columns to one long column | Excel Discussion (Misc queries) | |||
How to transpose a long list of text across cells | Excel Discussion (Misc queries) | |||
how do you keep fields in a column to print out for long list | Setting up and Configuration of Excel |