3
1
Looking for a way to achieve the following. Imagine I have 2 columns
A | B
---------------
NAME | SURNAME
---------------
Ned | Stark
Arya | Stark
Sansa| Bolton
I would like column C to contain the following: "The next to die will be NAME Surname. Cheers!"
so to achieve this I would make a formula like
=concatenate(The next to die will be,A2,' ',B2,'. Cheers!')
and then pull it down all my Rows
but this is a trivial example. sometimes I might have more than 20 columns, and the resulting string is way more complex. There must be a nicer way to do this? I am thinking like an equivilant to the c# function "Format" e.g.
=Format('The next to die will be {0} {1}. Cheers!',A2,B2)
Any suggestions?
If you're copying a formula, you only have to create it once, and concatenating a bunch of cell references takes way less time than writing this question. It isn't clear what the problem is. – fixer1234 – 2016-09-07T07:54:44.300
I disagree. If I have 20 columns, and the resulting string is 200 characters, littered with apostrophes and commas (I am generating sql statements) it can take ages and can be very error prone. There are other ways to do this (I could write a C# app to build the output, or I could do a bulk sql insert and use stored procs to do the heavy lifting). But that wasn't the point of my question, I am looking for a better excel solution to concatenation – Crudler – 2016-09-07T08:00:57.883
1I'm thinking to downvote you for using
Sansa Bolton
instead ofSansa Stark
. – jcbermu – 2016-09-07T09:29:03.2001was hoping someone would pick that up :) a bit of controversy attracts view me hopes :P – Crudler – 2016-09-07T14:35:21.197