delete columns

  1. U

    VBA: Delete Columns with Images

    Hi Gurus, I have some columns that I need to delete however, there are embedded picture image in cells. I tried using below code but the picture are still visible. = = = = Sub Delete() Worksheets("Sheet1").Activate Columns("C:C").Delete Columns("X:Z").Delete End Sub = = = = Is...
  2. U

    VBA: Delete Entire Columns based on Header value in Excel

    Hi Gurus, Good day! I found below code in deleting specific column. However, I want to apply it for all tab sheets. Suppose I have 15 sheets. = = = Sub DeleteSpecifcColumn() Dim xFNum, xFFNum, xCount As Integer Dim xStr As String Dim xArrName As Variant Dim MR, xRg As Range On Error Resume...
  3. H

    Use search box to extract the relative data from a different worksheet etc

    Hi all, Looking to create a search box with option buttons that once pressed searches a different worksheet for the search box content, then with all rows where this is present, copy them onto a neighboring worksheet and remove a few of the irrelevant columns at the same time. Complete...
  4. L

    delete calculated columns

    I have a borrowed VBA Code that will delete columns that = NR ( =IF((K1=0),"NR",(K2/K1)) ) problem is when the cells shift after deleting ==> the code seems to skip over other NR fields I have attached the code and a small sample of the excel sheet column range can be from H3 to many...
  5. berty2000

    Delete only Columns containing "No"

    In VBA is it possible to delete the whole columns containing the word "No" in the range of C2:AM2 ? Thanks in advance
  6. J

    Delete Columns between Two Specific Columns (based on column heading name)

    Hello, I have a unique situation where I need to delete the columns between two columns. The number of columns between these two will be different at various times... Column_B will always be the second column, but as columns are added in between, "Column_C" will push to the right Here is my...
  7. K

    Help with deleting columns based on conditional formatting please

    I have a spreadsheet with 72 rows and about 10,000 columns. I have applied conditional formatting to highlight all the cells which have a value of less than 150. Is there a way of now deleting all the columns where ALL the cells are highlighted/less than 150? At the moment I have the cells...
  8. M

    Delete same column until value is met !!!

    Hello Everyone! I need a macro keep deleting until the value is met!!! I have this code, but it stops after the first column is deleted instead of deleting the next new Column H until it = Today. How do I get it to Loop? Please, any help...
  9. J

    Macro needed to delete columns where one of two strings not present

    Hi. I regularly receive a spreadsheet that has several hundred columns and a similar number of rows. From column 'D' onwards, the only columns I'm interested in are ones that contain either string "Outstanding" or "Required". Can anyone suggest a macro that would delete all columns after 'D'...
  10. khawarameer

    Deleting Blank Columns in Power Query

    Hello All, I need to import a 256 column table using power query [every fortnight through ODBC]. There are at least 150 columns in the table are empty however there is no fixed criteria that which column would be empty. I order to refine the data i need to delete these empty columns. I used...
  11. A

    VBA- Extend formulas of columns or remove if not needed

    Hello, I am looking for help with a code that will help automate some financial statements. It is a standard tool that has the first year and the last year as an input. Based on the last year of analysis needed, the VBA code would extend (drag) the formulas to the column needed. Also, I built...
  12. M

    VBA Deleting Columns based on cell shading

    Hi All, The worksheets I have, require deleting all columns shaded green on row 13. Up to and including column 150. I have a spreadsheet with headers on row 13, and a few thousand rows of data thereafter. Variable number of columns, starting from 100 to several hundred depending. My problem...
  13. bepedicino

    Looking for assistance to make simple VBA modification

    I need the VBA to delete Column "F" as the very last step in the process. Since I am not familiar with VBA I am looking for help. It would be greatly appreciated if you could assist. Sub valuesAndDelete() With Application .Calculate .ScreenUpdating = False...
  14. S

    Deleting columns based on cell value

    Hi, I have a spreadsheet with a row of dates. I want to be able to put a date in a cell say "A1" and run a macro to delete all columns with dates newer then the date in A1. Thanks
  15. Z

    Simple Code to Delete Range of Columns on All Sheets in WB

    Hello, I have macro now that copies 10 sheets from my workbook and puts them into their own .Xlsx workbook. Once that happens, I want to delete (or clear contents on) a range of columns (P through Z) in all 10 of those sheets (in the new .xlsx file I just made). I must have tried 20 different...
  16. K

    SCREENSHOT INCL. - Fix Macro to Delete Columns whose header is not either "A" or "B"

    I have searched thoroughly the forums on how to keep only columns whose header is the text "x","y" or "c".. and saw a common formula pasted below: Option Explicit Option Compare Text Public Sub DeleteColumns() Dim iLastCol As Long Dim iPtr As Long iLastCol = Cells(1...
  17. U

    Macro: Deleting unneeded columns from exported CSV file

    Hi All, I am a complete noob at macros and have searched high and low for the answer to this question and would be eternally grateful to anyone who can help me out with this. I have an exported CSV file that has many unneeded columns that need to be removed. I also want to split a column so...
  18. J

    Know if specific columns were deleted

    Hi I have a worksheet_change event that I want to put in place but I am having problems ensuring that this event exits if columns A to E are accidentally deleted. I had the same problem with my code if a row was inserted but I started the event with the following: Public Sub...
  19. L

    Delete Method of Range Class Failed, Run-time Error 1004

    Hi everyone, This is my first post so I hope someone can help me out. The VBA macro that I have written is essentially a glorified transpose function (the specifics shouldn't be important for my question). Midway through the code I need to delete a large range of cells so that a) the formatting...
  20. O

    Delete empty Column with heading VBA

    Hi all again, I am am wanting to delete the entire column if there are no entires below the heading in Row 1. So in image below, Col C, E & G are to be delete including the heading. Thanks again everyone Cheers, O

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
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 "".
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