You are here:

Excel/Merge similar cells


Dear Tom,

Hope you are doing well...

I need your help in following:
I have one sheet showing the employee names in column A. training subject in column B, date of training in column AC.

the same employee name might repeated several times within the range (A:A.D.), because each employee maybe conducted more than one training

Ultimately, I want to know how many employee conduct training.
is there any code can make : (if employee name is repeated, then merge these two or more cells and sort the table per name)


Column A        Column B          Column AC
Johan          Leadership          11/7/2012
Tom          Microsoft office      01/5/2013
Rommel          IT awareness          26/9/2012
Nael          Operation ratios      11/5/2011
Johan          IT awareness          26/9/2012
Tom          IT awareness          26/9/2012
Johan          Microsoft Office      01/5/2013

Count above will show 7

My requirement:
Column A        Column B          Column AC
Johan          IT awareness          26/9/2012
         Microsoft Office      01/5/2013
         Leadership          11/7/2012
Nael          Operation ratios      11/5/2011
Rommel          IT awareness          26/9/2012
Tom          IT awareness          26/9/2012
         Microsoft office      01/5/2013

Count above will show 4

Thanks & regards

Pivot Table
Pivot Table  

Are you familiar with pivot tables.  This can be easily done using a pivot table.

The cells won't be merged, but they will be all together in contiguous rows.  

You have to go into pivot table options and choose the classic pivot table appearance under the display tab.  

I have removed totals for rows and columns as well as they are not really pertinet.

Of the 4 at the bottom of the names, I used =countif(E3:E4,"<>")

The picture was taken in Excel 10, but Pivot tables have been in Excel for many versions.

(this revision uses a larger picture - not sure what Allexperts will do with it but hopefully you will be able to see it)

Tom Ogilvy

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2017 All rights reserved.