insert column

  1. N

    Insert new dates with dynamic formula to include new range

    I need to insert new dates as I add new dates I need to calculate the 4 wk, 8 wk, & 13 wk. For example, if I inserted 2/10/2024, I would need the formula to take into account the new date and provide the 4 wk, 8 wk, & 13 wk average. I used this formula: =ROUND(AVERAGE(OFFSET(D4, 0...
  2. L

    VBA Code help - inserting columns in a specific order

    Hello! I have a code that is almost working, but I need some help getting the last bit. I am essentially trying to ensure that I have a consistent set of columns, in a specified order. Sometimes when we export a report from our financial tool, it doesn't give us all the columns we need, so this...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...

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