Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2024, 09:36 AM
Kalü2 Kalü2 is offline Merge Cells with between top and bottom border Windows 10 Merge Cells with between top and bottom border Office 2010
Novice
Merge Cells with between top and bottom border
 
Join Date: Feb 2019
Posts: 2
Kalü2 is on a distinguished road
Default Merge Cells with between top and bottom border

Hello,


I have a large table and i need to merge colum by column all cells that begin with the cell which has a visible top border and ends with the cell that has a visible bottom border. some cells already have top and bottom border and can be skipped.


The result is for example Skip Cell1 in Column1 merge Cell2, Cell3 and Cell4 in Column1 then megre Cell 5 and 6, Skip Cell 7 and so on.

I have no clue how to find and select the cells. Could someone help me please?
Reply With Quote
  #2  
Old 04-01-2024, 11:44 AM
TessaMurillo TessaMurillo is offline Merge Cells with between top and bottom border Windows Vista Merge Cells with between top and bottom border Office 2010
Advanced Beginner
 
Join Date: Mar 2024
Posts: 33
TessaMurillo has a little shameless behaviour in the past
Default

Hello!

You can use a VBA macro in Excel to perform this task. Here's some sample code that might help you:

Set rng = Range("A1:E10") ' Replace "A1:E10" with the range of your table

For Each cell In rng

If cell.Borders(xlEdgeTop).LineStyle <> xlNone And cell.MergeCells = False Then

Continue on my own, because I don’t know
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
bottom border arvin_cool88 Mail Merge 0 02-20-2024 04:45 AM
Bottom border on every page break Marcia Excel Programming 0 01-30-2019 06:42 AM
Merge Cells with between top and bottom border Table bottom border not performing well herpez Word Tables 2 01-16-2017 03:43 PM
How to extend a table bottom border to the end of the page mikemike616 Word VBA 1 08-20-2015 08:08 PM
Merge Cells with between top and bottom border Bottom border doesn't display at certain zoom Cosmo Word Tables 1 10-09-2013 10:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft