Merging cells in multiple columns based on the value in a single column

mummbles74

Board Regular
Joined
Nov 14, 2009
Messages
120
Office Version
  1. 365
Platform
  1. Windows
Hello again you wonderful people, I have hit another road block from the limit of my skills.

i have some data that is download from a bespoke inspection system and unfortunately because of the way that multiple faults can be raised against the same piece of equipment the downloaded data contains merged cells. I have a spread sheet that contains formulas which are carrying out some risk ranging tasks. I have all of that side sorted, the end result is a spread sheet that has the overall risk ranking at the end of the sheet. What I would like to do is then sort the data so that the highest risk ranked items go to the top. To achieve this I have unmerged all of the data and by selecting the blank field I have filled with the data above with a formula and then replacing those items with values rather than formulas, then sorting the data by the unique tag number in column A and the risk rank in column Y, this gives me the data almost exactly how I would like it. The final step I would like to achieve is to re merge the columns that I originally unmerged and I would like to do this based on the duplicated values in Column A.

So if Column A values are the same I would like to merge those cells as well as the values in columns B, C, D & M the duplicate values in Column A are all together because of the sort that I applied but the number of rows that would need merging in each column varies. I have found some code that allows me to merge the information in Column A but not apply this selection across the required columns.

I hope that makes sense;

If data in A1, A2 & A3 is duplicate then merge these rows in Columns A, B, C, D & M then move the the next duplicates.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I think the phrase "merged cells" sends shivers down most people's spines, as they are about the worst feature in Excel and cause nothing but trouble (and should really be avoided altogether, if at all possible).

That being said, I think it would be hugely beneficial for us if you could show us a sample of what this data looks like BEFORE you want to apply this last step, and what you would like it to look like AFTER the last step.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top