insert column

  1. RoseChompooh

    Insert Column in loop for another sheet

    Hi Guys, I want to insert the column (in loop) for another sheet. The example below is the code for inserting column in the current sheet only. However, does anyone know how can I insert the column in Sheet 2 from the code below please ? Example: Sub VBAColumn4() Dim Column As Integer...
  2. dannyok90

    Insert new row & column with VBA

    Hi All, Im trying to incorporate an add new row and column funtion in my spreadsheet How can i get the following bits of code to work independantly of each other? The first part of the code works fine and adds a new row exactly where i want it but im struggling to get the second add column...
  3. H

    Insert columns with VBA

    A bit of a novice here. I usually try to find my answers first before posting, although I kinda found an answer on a thread here, when asking for help I was told to start a new thread. So... I have a sheet with 5 columns (C-G). I need to insert 5 columns with the same formatting and formulas...
  4. J

    Syntax Error - Insert Column Header (Good), Insert Formula in Row 2 (Good), Drag to Last Row (ERROR)

    Hello, any ideas how I can get the following code to work? I am adding a column called "Value less VAT", then adding in the formula in row 2, then attempting to drag it down to the last row. Everything works like a charm, except the dragging down portion. See details below. Code #1 = my code...
  5. B

    Code efficiency.. input needed

    I more or less need some input on if this code could be more efficient. If it can be faster please let me know how. All input is much appreciated, even if it is as simply as it's good as is. Dim MyTest As Range, AshF As Range, AshT As Range Dim AshH As Range, AshL As Range, myRng As Range...
  6. J

    VBA column selecting

    I am working on an inventory project and have 2 problems that i cannot find a solution for. 1. The first is i need to select the first empty cell in the first row and fill it with the current date. I have the code for the date working great and the code works fine the first time, but after...
  7. Gingertrees

    Need help to change If-then to Array

    The following code works as desired, but will be SLOW when there are more columns present (the elements are merely examples - my actual worksheets have 40+ columns and can have hundreds of rows). I feel like this could be an array formula, but I'm just learning about those. Could someone help...
  8. S

    Conditional Formatting, Delete Row with "" in A:A, Insert column

    I should mention first, i'm new to the VBA and trying to learn, please excuse any of my rookie mistakes, and I greatly appreciate all of the help/input anyone is able to provide. I have a report that we run daily. It involves pasting data from a database, removing rows with no Call...
  9. E

    Loop Insert Column and Function

    Hi, I have a 100+ column spreadsheet. For each column, I have to insert a new column (starting at column "C" to the last column) and fill it with text from the first cell of the column to the right. I use this code to make it work, but I have to copy it 100+ times for each column insert. Is...
  10. V

    write a macro to insert columns based on Cell Values

    I have a worksheet where I must insert a column every time the user selects 2 values (found in Pricelists sheet). So Basically whenever a user chooses the Quote LP, or the Sell on web Values from the cell dropdown, I must insert a column adjacent to the value. (The dropdown values are referred...
  11. P

    Insert Column and add fields

    I have an Excel spreadsheet that where the headings start in row 5. Data starts in row 6. The spreadsheet is updated frequently. The headings are always the same but the number of lines of data changes. D5 = Units1 (field contains numbers or is blank) E5 = Units2 (Field contains numbers or is...
  12. J

    How to insert 1 row between every row that has an entry in excel

    Hello everyone , i am very new to this . i Was wondering if anyone can help me i have a two step problem The first part of it is that i would like to be insert a new Row between each row on my Excel sheet that has data so if i have had Kilometres Time 1 10 3...
  13. B

    VBA - Inserting a variable number of columns based on the value of a cell

    Hi all, It is the very first time I work with VBA and I am struggling quite a bit. I have an Excel sheet in wich I have to insert a number of columns equal to a value in a cell. Note that the value in this cell will change over time. As a result, it is always the same cell that I would like to...
  14. M

    Insert Column greyed out as column contains locked cells

    Hi, I have got an excel spreadsheet that I have some rows protected in (utilising a macro). Because of the protected rows I can no longer insert new columns as the option is greyed out (because I have protected it against selecting some of the rows) when I right click a column header. Is there...
  15. C

    Use macro to insert new column after every 4th column

    Hello, I realize that this is probably a topic that has been discussed before, but I couldn't find an answer that worked for me from prior topics. I have an excel spreadsheet with a large amount of employee data. About 150 employees are listed across the columns along the top, with four...
  16. A

    Macro to insert columns with preserved formulas

    Hi. I posted this a little while ago with no luck. Any new takers?? I need a macro for inserting a column at a prescribed location (i.e. this will vary according to what the user wants). This column needs to have the same formulas as the column to the left. I would like a dialogue box to come...
  17. S

    VBA (Offset, InsertColumn, CountIF

    Hello, I'm trying to insert a number of column in the middle of worksheet. The number of columns are dynamic based on the date range in another tab. I need to take the total number of columns in that tab and dynamically change the number of columns i add in based on whether a toggle choice is...

Some videos you may like

This Week's Hot Topics

  • Use Filter function with 2 criteria to return a specific value
    I've spent many hours trying to find out why the basic formula for Filter function with 2 criteria will not return a value other than #CALC. I'm...
  • Loop stopping at row 10
    Below is a code I had a lot of help with from user such as yourself. This code worked well but now is stopping a row 10 and I can't see why! Could...
  • Numerical Order Code for Macro
    I am trying to find a code or fix what i have on the macro that will automatically make the certain column generate in numerical order when I...
  • Calculate time in excel
    I get a text report from our time keeping system that i dump into excel through a data connection and I need to calculate the total hours for a...
  • VBA
    Hello everyone, I need your help please. I just need VBA code to get my reports working. What I want to do is whenever these dropdowns are...
  • Help with formula to sum numbers prior to date
    Hello, I was hoping to get some assistance as I'm having trouble with this. Using my table below as an example, how could I write a formula which...

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
Top