formula for cell merging

L

luvrama

Hi All,

I need know, whether there is any formula in excel, which will merge
two or more cell?

Can any one help me in this regard..

Thanks,
Rama.
 
M

moondark

You can automatically merge cells via macro, but as far as I know
there's no excel-formula.

just in case you need it,
the code for merging cells would be:


Code:
--------------------
RangeObject.Merge
--------------------

That was pretty easy, ain't it? Well, to anticipate the question "what
a rangeobject is": You can replace by expressions like:
Cells(1,1) for Cell A1
Range("A1:B2") for Cells A1 to B2
or Columns("A:A") for all Cells in col A
or Activesheet.Cells to merge the whole spreadsheet to one cell

There are way more expressions that return RangeObjects, but I think
you've got the idea. ;)

Regards,

Simon
 
G

Gord Dibben

Rama

There is no formula that will "merge" cells but if you actually mean "combine
data from 2 or more cells into one cell"..........

=A1 & B1 & C1 entered in D1 will combine those three into D1.

If you wish to have a space between enter =A1 & " " & B1 etc.


Gord Dibben Excel MVP
 
Top