Required merging with macro button!

Kamran01

Board Regular
Joined
Feb 10, 2017
Messages
86
Hi Genius,

I need Little help regarding Merging cells with a button..
I am creating a Gantt Chart using excel formulas..

I want when i press a button, it Show me merge data according to below range.

1) B2:G2
2) B3:D3 & E3:I3
3) B4:F4


ABCDEFGHI
1LINES #2/103/104/105/106/107/108/109/10
2HS-01C&A | CHINO DOBBY 1| 5900 | 23 | 23/JAN | 0
3HS-02C&A | BASIC| 8000 | 23 | 23/JAN | -2C&A | JACKET | 10000 | 23 | 23/JAN | -11
4HS-03C&A | ROMPER | 9800 | 23 | 23/JAN | 2

<tbody>
</tbody>
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
.
Is this what you are seeking ?

Code:
Sub delete_empty_cells_shift_left()
    Range("A1:I5").Select
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.Delete Shift:=xlToLeft
End Sub
 
Upvote 0
Hi Logit,

I mean i have not to delete blank cells but have to merge cells from next to filled column till filled column.
This is not working for me like my problem is..

Thanks,
Kamran Noor
 
Upvote 0
.
Post and AFTER image so we know what you are seeking.

How do you want the cells to be / look after the merge ?
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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