Excel Problem

Log in to stop seeing adverts

Status
Not open for further replies.

Joe_Fox

Well-Known Member
Hello,

I have some cells I want to merge into one cell, for example:

figure 1.

Code:
  A   B   C   D 
1 23  66  24  87
2 34  56      67

I want column E to be filled with the merged data but with each cell being separted by a semi-colon, so it should look like this:

figure 2.

Code:
  A   B   C   D   E
1 23  66  24  87  23;66;24;87
2 34  56      67  34;56;67

I am using the formula E1=A1&";"&A2&";"&A3&";"&A4.

My problem is that when a cell is blank, like C2, the result is that a semi-colon is placed in the merged cell, resulting in this:

figure 3.

Code:
  A   B   C   D   E
1 23  66  24  87  23;66;24;87
2 34  56      67  34;56;;67

How can I make the merged cell look like it does in figure 2?

I think I need to use some IF functions but how do I say ignore blanks?

Any help would be hugely appreciated.
Thanks,
Joe_Fox
 
Highlight the exta ; then press the delete key.
 
i sorted it myself, it required some brain work but i got there in the end. thanks anyway.
 
i sorted it myself, it required some brain work but i got there in the end. thanks anyway.

Would you like to share the solution, Joe.
 
surely just wrap everything in if statements?

E1=A1&if(A1 <> "" , ";", "")&A2&if(A2 <> "" , ";", "")&A3&if(A3 <> "" , ";", "")&A4.
 
oh an excel one

soz, have been changing jobs lately...

PM me when you post an excel one, there's not much i don't know about excel, access & VBA
 
oh an excel one

soz, have been changing jobs lately...

PM me when you post an excel one, there's not much i don't know about excel, access & VBA

What are you doing now then? Liquid Analyst didn't do it for you? :102: :102: :icon_conf :icon_conf
 
..PM me when you post an excel one, there's not much i don't know about excel, access & VBA

I don't know what it is but, I hate all having to use Excel & Access, well, databases & spreadsheets fullstop. They make my head hurt. :icon_lol:

I always delegate, where ever possible, at work.
 
What are you doing now then? Liquid Analyst didn't do it for you? :102: :102: :icon_conf :icon_conf

i'm a Tactical Analyst now, spreadsheets and databases, similar job, different bank
 
hbos?
 
Status
Not open for further replies.
Log in to stop seeing adverts

Championship

P Pld Pts
1Blackburn 00
2Bristol City00
3Burnley00
4Cardiff City00
5Coventry City00
6Derby00
7Hull City00
8Leeds Utd00
9Luton Town00
10Middlesbro00
11Millwall00
12Norwich City00
13Oxford Utd00
14Plymouth 00
15Portsmouth00
16Preston 00
17QPR00
18Sheffield W00
19Stoke City00
20Sunderland00
21Swansea City00
22Watford00
23West Brom00
24Sheffield Utd0-2

Latest posts

Top