PPT Macro to delete column

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
996
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team,

I need to delete Ctrl column from 2nd to end and output need as per image 2. with same format...
curretly row 1 and last row are in merge so need as per image to output
Selection pane "Content placeholder 8"

1698379321153.png
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi Team,

I need to delete Ctrl column from 2nd to end and output need as per image 2. with same format...
curretly row 1 and last row are in merge so need as per image to output
Selection pane "Content placeholder 8"

View attachment 101061
to do this, i need to see address of all columns and first row of table
 
Upvote 0
to do this, i need to see address of all columns and first row of table

Sure!! I Eiloken,
Thanks for your support on this:)

So i need columns 2,3,5,7 column asper image 2 and the current 1st-row header is in merge so those also need in 2,3,5,7 ( if i split the cell then the header position is 2,4,6 and the same applies for the last row.

Let me know if you need more information Basically i need same output as image 2 :)

Regards
Sanjeev
 
Upvote 0
Sure!! I Eiloken,
Thanks for your support on this:)

So i need columns 2,3,5,7 column asper image 2 and the current 1st-row header is in merge so those also need in 2,3,5,7 ( if i split the cell then the header position is 2,4,6 and the same applies for the last row.

Let me know if you need more information Basically i need same output as image 2 :)

Regards
Sanjeev

Hi Sir,

Could you please provide an update on this :)

Regards
Sanjeev
 
Upvote 0
I am guessing your example is an oversimplication but in case its not lets start with this.

VBA Code:
Sub UnmergeAndRemoveCols()

    Dim ws As Worksheet
    Set ws = ActiveSheet
    
    With ws
        .Rows(1).MergeCells = False
        .Cells(1, 5).Value = .Cells(1, 4).Value
        .Cells(1, 7).Value = .Cells(1, 6).Value
        .Columns(6).Delete
        .Columns(4).Delete
    End With
End Sub
 
Upvote 0
I am guessing your example is an oversimplication but in case its not lets start with this.

VBA Code:
Sub UnmergeAndRemoveCols()

    Dim ws As Worksheet
    Set ws = ActiveSheet
   
    With ws
        .Rows(1).MergeCells = False
        .Cells(1, 5).Value = .Cells(1, 4).Value
        .Cells(1, 7).Value = .Cells(1, 6).Value
        .Columns(6).Delete
        .Columns(4).Delete
    End With
End Sub
Hi Alex,

Thanks for looking into this just wanted to let you know i have a table on PPT (Content placeholder 8 Under Selection pane)
and need to delete the column

So i need columns 2,3,5,7 column asper image 2 and the current 1st-row header is in merge so those also need in 2,3,5,7 ( if i split the cell then the header position is 2,4,6 and the same applies for the last row.

Let me know if you need more information Basically i need same output as image 2 :)

Could you please see images on post 1

Regards
Sanjeev
 
Upvote 0
Unfortunately repeating what you had in post #3 doesn't help us very much.
What does PPT mean ? If Power Point is involved I probably can't help you.

Did you try the macro ?
If so show us the output and point out what is wrong with the output.
Is the only issue the last row ?
 
Upvote 0
Unfortunately repeating what you had in post #3 doesn't help us very much.
What does PPT mean ? If Power Point is involved I probably can't help you.

Did you try the macro ?
If so show us the output and point out what is wrong with the output.
Is the only issue the last row ?
Hey Alex,

Yes, I have tried the Macro that you have provided us, and this works perfectly on Excel but i need the same thing on PowerPoint table
my table shape is Content Placeholder 8

Regards
Sanjeev
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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