
tempSht.Delete 'deletes the temp worksheet.sht.Range("A1:C" & lRow).Borders.LineStyle = xlContinuous.sht.Range("A1:C" & lRow).PasteSpecial xlPasteFormats 'pastes the table back into your main sheet from temp using paste formats.i = 0 'resets to 0 to allow next ISD Code to be looked at.tempSht.Range("B" & Cell.Row - i & ":B" & Cell.Row).VerticalAlignment = xlCenter.tempSht.Range("B" & Cell.Row - i & ":B" & Cell.Row).Merge ' merges cells in column B.tempSht.Range("A" & Cell.Row - i & ":A" & Cell.Row).VerticalAlignment = xlCenter.tempSht.Range("A" & Cell.Row - i & ":A" & Cell.Row).Merge 'merges cells in column A.tempSht.Range("A1:C" & lRow).Value = sht.Range("A1:C" & lRow).Value 'copy the table from the original sheet to the temp sheet.sht.ShowAllData 'clears any filtering that may be applied.sht.Range("A1:C" & lRow).AutoFilter 'adds filter if no filter.= "Temp" ' create a temporary worksheet to merge the cells.Set sht = Worksheets("Sheet1") ' Change your sheet name as required here.Application.Calculation = xlCalculationManual.

Is there a way to achieve the first method using VBA, without having to use PasteSpecial?

But when filter is applied, only one corresponding is fetched from Column C. In this case, I am prompted with a message that warns: "Merging cells keeps the upper-left value and discards other values". The second method: I use the Merge Cells from Home Ribbon. Also, notice that when the cells are unmerged, all underlying cells still have the data in them. When I use this method, I can apply filter in Column A (ISD Code), and it fetches all corresponding rows from Column C (State). The first method: I am merging cells using format painter by copying format of another set of merged cells from Column B to Column A. The need: I want to merge some cells with same data in a column so it looks more organized, at the same time I should be able to apply a filter on that column that can fetch all rows from other columns corresponding to merged cells.
