#1   Report Post  
Posted to microsoft.public.excel.misc
PL PL is offline
external usenet poster
 
Posts: 58
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 345
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

Reply
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
merge two excel files like in word mail merge azmerritt Excel Discussion (Misc queries) 1 December 11th 16 09:23 PM
Merge option is not available. How to undo merge in this case? Gauri Excel Discussion (Misc queries) 1 October 9th 06 09:58 AM
mail merge excludes my headers and critical data in Word merge Nix Excel Discussion (Misc queries) 0 April 21st 06 08:35 PM
Merge =( formula should retain fraction type numbers after merge. Aubrey Excel Worksheet Functions 0 February 9th 06 07:37 PM
how do i get my mail merge to update the data source at each merge Steel_Monkey Excel Discussion (Misc queries) 0 November 30th 05 08:41 AM


All times are GMT +1. The time now is 02:48 PM.

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

About Us

"It's about Microsoft Excel"