LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Hopefully an easy one - turning a list into a row

Thanks all for your help

Both these get me what i'm after

cheers



"Gord Dibben" wrote:

Just a head's up.

If user has blank cells in the range, your code will produce extra
de-limiters.

Try this revision.

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


Gord Dibben MS Excel MVP

On Wed, 23 Sep 2009 09:10:02 -0700, Gary''s Student
wrote:

Function RowThem(r As Range) As String
RowThem = ""
For Each rr In r
If RowThem = "" Then
RowThem = rr.Value
Else
RowThem = RowThem & "|" & rr.Value
End If
Next
End Function





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependent Dropdown List - Not Easy! kditty02 Excel Worksheet Functions 2 April 16th 07 02:00 AM
Turning column contents into text list separated by a comma Kevin Rhinehart Excel Discussion (Misc queries) 1 January 16th 07 07:00 AM
Deleting or 'turning off' a list Brent Excel Discussion (Misc queries) 2 October 2nd 06 11:14 PM
Macro turning colums w/headers into list on multiple sheets MentalDrow Excel Programming 1 April 10th 06 06:32 PM
An easy one: Help with some VB funct about list and filter filo666 Excel Programming 8 December 1st 05 12:46 AM


All times are GMT +1. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"