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
1Leicester4697
2Ipswich4696
3Leeds Utd4690
4Southampton4687
5West Brom4675
6Norwich City4673
7Hull City4670
8Middlesbro4669
9Coventry City4664
10Preston 4663
11Bristol City4662
12Cardiff City4662
13Millwall4659
14Swansea City4657
15Watford4656
16Sunderland4656
17Stoke City4656
18QPR4656
19Blackburn 4653
20Sheffield W4653
21Plymouth 4651
22Birmingham4650
23Huddersfield4645
24Rotherham Utd4627

Latest posts

Top