LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default Concatenate a row that is selected and include blank cells

Can this neat little snippet be altered to work on a row of selected cells AND include the blanks?

Works fine as is with =ConcatMe("A1:Z1") but omits any blanks.

I may want only A1:G1 including the blank cells if any. =ConcatMe('Selection')

Thanks,
Howard

Option Explicit

Function ConcatMe(Rng As Range) As String

Dim cl As Range

ConcatMe = ""

For Each cl In Rng
ConcatMe = ConcatMe & cl.Text
Next cl

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
Filters will not include cells beyond the first blank? stuckatCU Excel Discussion (Misc queries) 2 May 22nd 09 07:49 PM
OFFSET to include blank cells GMCN Excel Worksheet Functions 2 April 3rd 06 10:11 AM
Macro to concatenate previously selected cells Grumpy Excel Programming 1 November 22nd 05 02:42 PM
blank cells that include text Cally Excel Worksheet Functions 3 November 5th 04 01:01 AM
Moving between a cell that is selected to include a range of cells in that row kls[_2_] Excel Programming 0 September 30th 04 12:14 AM


All times are GMT +1. The time now is 05:39 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"