A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

merge



 
 
Thread Tools Display Modes
  #1  
Old December 21st, 2009, 06:38 AM posted to microsoft.public.excel.misc
PL
external usenet poster
 
Posts: 104
Default merge

Hi

I have a row of words each in separte cells, I want to merge all of them
into 1 cell.

thanks
  #2  
Old December 21st, 2009, 06:48 AM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default merge

Try the below formula
=A1&B1&C1&D1

If you dont want to write this formula try the below UDF (User Defined
function). From workbook launch VBE using Alt+F11. From menu Insert a Module
and paste the below function.Close and get back to workbook and try the below
formula.

Syntax:
=CONCATRANGE(rngRange,strDelimiter,blnIgnoreBlank)
rngRange is the Range
strDelimiter Optional . Default is space
blnIgnoreBlank Optional. Default is False

Examples:
'1. Concatenate with default delimiter(space)
=CONCATRANGE(A1:A10)

'2. Concatenate with semicolon as delimiter and ignore blanks
=CONCATRANGE(A1:A10,":",1)

Function CONCATRANGE(rngRange As Range, _
Optional strDelimiter As String = " ", _
Optional blnIgnoreBlank As Boolean = False)
Dim varTemp As Range
For Each varTemp In rngRange
If blnIgnoreBlank Then
If Trim(varTemp) vbNullString Then _
CONCATRANGE = CONCATRANGE & strDelimiter & varTemp
Else
CONCATRANGE = CONCATRANGE & strDelimiter & varTemp
End If
Next
CONCATRANGE = _
WorksheetFunction.Trim(Mid(CONCATRANGE, len(strDelimiter)+1))
End Function

--
Jacob


"PL" wrote:

Hi

I have a row of words each in separte cells, I want to merge all of them
into 1 cell.

thanks

  #3  
Old December 21st, 2009, 06:53 AM posted to microsoft.public.excel.misc
Ron@Buy
external usenet poster
 
Posts: 348
Default merge

Presupposing your words are in column A stating at row 1 and continuing down
thro' rows 2 onwards
Use a blank cell say B1 and use this formula:
=A1&" "&A2&" "&A3&" "&A4 and so on. Change the cell references to suit where
the words are.
The &" "& will create a space between each word or group of words in each
cell.
Hope this helps.

"PL" wrote:

Hi

I have a row of words each in separte cells, I want to merge all of them
into 1 cell.

thanks

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:03 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.