PC Review


Reply
Thread Tools Rate Thread

Concate a range ignoreing blank cells

 
 
Nigel
Guest
Posts: n/a
 
      16th Jun 2009
Is it possible to concate acroos a rage ignoring any blank values in cells,

for example I wold like to concate A1 to A6 but if there is no value in A4
ignore that cell

Thanks


 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      16th Jun 2009
Nigel,

Either your not explaining correctly or I'm not understanding because
concatenate ignores empty cells. That's not strictly true but it has the same
effect because it simply concatenates nothing from an empty cell.

Try the formula below and you will only see values from populated cells

=CONCATENATE(A1,A2,A3,A4,A5,A6)

Mike

"Nigel" wrote:

> Is it possible to concate acroos a rage ignoring any blank values in cells,
>
> for example I wold like to concate A1 to A6 but if there is no value in A4
> ignore that cell
>
> Thanks
>
>

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      16th Jun 2009
If you want these values de-limited in some way then blank cells become a
factor.

Otherwise, as others have pointed out, it doesn't matter.

Maybe this UDF is what you want?

Function ConCatRange22(CellBlock As Range, Optional Delim As String = "") _
As String
'entered as =concatrange22(a1:a10,"|") desired delimiter between quotes
Dim Cell As Range
Dim sbuf As String

For Each Cell In CellBlock.Cells
If Cell.text <> "" Then
sbuf = sbuf & Cell.text & Delim
End If
Next Cell

ConCatRange22 = Left(sbuf, Len(sbuf) - Len(Delim))

End Function


Gord Dibben MS Excel MVP

On Tue, 16 Jun 2009 12:20:01 -0700, Nigel <(E-Mail Removed)> wrote:

>Is it possible to concate acroos a rage ignoring any blank values in cells,
>
>for example I wold like to concate A1 to A6 but if there is no value in A4
>ignore that cell
>
>Thanks
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Concate a range ignoreing blank cells Gary''s Student Microsoft Excel Programming 0 16th Jun 2009 08:27 PM
Range naming cells with blank cells through coding Naveen J V Microsoft Excel Misc 1 27th Mar 2008 01:46 PM
Maximum Number of Blank Cells between Non Blank Cells in a Range Mal Microsoft Excel Worksheet Functions 5 3rd Nov 2007 08:21 AM
Determine if range has NO Blank Cells without looping through each cell in range Excelenator Microsoft Excel Programming 4 4th Aug 2006 06:30 AM
How do I skip blank cells when copying over a range of cells? =?Utf-8?B?dGF3ZWxscw==?= Microsoft Excel Misc 2 7th Jun 2005 09:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 AM.