ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to simplify CONCATENATE (https://www.excelbanter.com/excel-discussion-misc-queries/200387-how-simplify-concatenate.html)

Siva

How to simplify CONCATENATE
 
I am trying to select from a column of 30-40 cells (cells that are not blank)
and combine them into one cell. I am using concatenate but formula will be
too long.


Eg of my formula
=CONCATENATE(G2,"",G3,"",G4,"",G5,"",G6,"",G7,"",. .. G30)

Thanks

--
Siva

Dave Peterson

How to simplify CONCATENATE
 
=g2&g3&g4&g5&...&g30

If you have to do this for lots of cells, you may want to use this function from
JE McGimpsey:
http://www.mcgimpsey.com/excel/udfs/multicat.html

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Siva wrote:

I am trying to select from a column of 30-40 cells (cells that are not blank)
and combine them into one cell. I am using concatenate but formula will be
too long.

Eg of my formula
=CONCATENATE(G2,"",G3,"",G4,"",G5,"",G6,"",G7,"",. .. G30)

Thanks

--
Siva


--

Dave Peterson

Siva

How to simplify CONCATENATE
 
Thanks Dave
--
Siva


"Siva" wrote:

I am trying to select from a column of 30-40 cells (cells that are not blank)
and combine them into one cell. I am using concatenate but formula will be
too long.


Eg of my formula
=CONCATENATE(G2,"",G3,"",G4,"",G5,"",G6,"",G7,"",. .. G30)

Thanks

--
Siva


Colin Foster

How to simplify CONCATENATE
 
Hi Siva,

Try =G2&" "&G3&" "&G4 etc

.... and if in, for example, have a space in Cell H1 (i.e. select H1 & hit
the spacebar),

Then in H2 have the formula... =$H$1&G2
with =H2&$H$1&G3 in H3, then you can copy this down all the way to the
bottom of your data which in (say) H30 will have G2value <space G3value
<space...G30value

Try it, it makes more sense than me trying to type it!!

And don't forget that to quickly copy this formula down, double click on the
Black + sign that appears when you hover your mouse over the bottom right
corner of the cell

Hope this helps
Regards
Colin

"Siva" wrote:

I am trying to select from a column of 30-40 cells (cells that are not blank)
and combine them into one cell. I am using concatenate but formula will be
too long.


Eg of my formula
=CONCATENATE(G2,"",G3,"",G4,"",G5,"",G6,"",G7,"",. .. G30)

Thanks

--
Siva



All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com