[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Merging cells "only if" second cell is populated

Posted on 2013-12-31
9
Medium Priority
?
236 Views
Last Modified: 2013-12-31
I need to merge info from two Excel columns into one.  Know how to do that. But, I need to insert a semicolon between info from each column "only if" the second column has info.  Not all second columns will be populated when the merge is conducted.  I don't want to end up with "info:nothing."  Want to have "info:info" only when it applies.  Does that make sense?
0
Comment
Question by:CynSzcz
  • 6
  • 3
9 Comments
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 39748250
col A and col B has data

resultant col formula

 =IF(NOT(ISBLANK(B1)),CONCATENATE(A1,":",B1),A1)
0
 

Author Comment

by:CynSzcz
ID: 39748294
Thanks Wizard,
Your solution worked for the columns that both have info (filled in from both sides with colon in center), but I also need to have the third column filled even if it is just from one column but without the colon inserted and nothing after it.  (Examples:  if two columns both contain info, need both info and semicolon;  if only column has info - need that info to come into new column "without" a semicolon after it.)
0
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 39748307
The solution i posted does give you the values in the both columns with : at the middle when both the columns are populated.
If there is not data in 2nd column, only the first column data is in the result (without :)

Can you send me the excel sheet for sample please. cant get your point.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:CynSzcz
ID: 39748322
I appreciate your assistance.  I cannot send sheet because info does not belong to me.  I ran your formula and the only cells populated in the new column are cells where info came in from both of the other columns and are separated by the semicolon.  If there was only info in one of the initial columns (not both) then the cell in the new column is empty.  It worked perfect.  But I need ALL cells in the new column populated even if there was only info from one column moved to it.
0
 

Author Comment

by:CynSzcz
ID: 39748326
What i am trying to say is "if two cells are merged and there was info in both then I need a semicolon inserted.  If two cells are merged and info is only coming in from one column then I need that info but will not require the semicolon.
0
 

Author Comment

by:CynSzcz
ID: 39748339
column B will always have info; column A "may" have info.  Sorry, should have mentioned that in the beginning.
0
 

Author Comment

by:CynSzcz
ID: 39748362
Example of sheet.  Need column C populated in all cases.
Wizard.xlsx
0
 
LVL 19

Accepted Solution

by:
Raheman M. Abdul earned 2000 total points
ID: 39748379
Will this help:

=IF(NOT(ISBLANK(A2)),CONCATENATE(B2,":",A2),B2)
0
 

Author Closing Comment

by:CynSzcz
ID: 39748385
BINGO!!!!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question