I have a large list of cells in excel: 15, 33, 90, 102, 149, 159, 217, 228, 238, 247, 305, 312, 369, 417, 428, 486, 538, 548, 606, 621, 671, 679, 737, 805, 816, 874, 915, 923, 981, 1029,1038 .
Under each of these cells I would like to insert 20 blank rows. I have tried various codes but i'm struggling with the fact that as soon as I insert 20 rows at cell 15, all the other cellnumbers change.
This is a reformulation of this post: [URL] ...........
I have the following macro that inserts a blank line when a field changes. This works fine. However I would like to use this in another spreadsheet that has several addition columns of unrelated data. Therefore I want to insert 1 (row of) blank cells only in the columns specified in the range. The range is 3 columns wide, E - G. I think I'm close, but ...
Dim myRow As Long myRow = 3 'data starting row Do Until Cells(myRow, 5) = "" ' the # is the column that changes which I want to trigger a blank insertion If Cells(myRow, 5) = Cells(myRow - 1, 5) Then myRow = myRow + 1
I have a spreadsheet with 27 Columns and 439 rows of data. I need to copy each row of data that has a certain criteria and paste the same data 141 times below it and then manipulate the data. In the same spreadsheet I need to copy a row of data that has other criteria in it and past it 30 times below it, and then manipulate the data.
I have been using the copy and insert copied cells function, but I have to scroll down 141 or 30 rows each time to ensure I add in the correct amount of rows. Is there a more productive way to do this? I have about 10 workbooks with approximately 47 tabs/worksheets each that I will need to update in a similar fashion.
I work with a spreadsheet every week to input values and subtotal them. These values change constantly and instead of going through and manually deleting each row in a 100+ row spreadsheet to be able to import into another program, I'm looking for an quicker way to keep my data in order but consolidate by getting rid of only the rows where both column A and B are blank.
Here's an example of what I'm working with:
5 10 15 20 50 2 4 6 8 20
This is what I need the final product to look like:
5 10 15 20 50 2 4 6 8 20
So I would like to quickly delete rows 2, 5, and 11. All of the other answers I've found only show how to delete rows based on empty cells in only 1 column. How can I quickly delete the rows where both columns are empty?
I would like to have my macro code search column A (supplier numbers) and split the rows into groups of rows of 5 or less and then insert 3 blank rows between each group of rows. The split needs to start on a new supplier number and cannot split a supplier number into two different groups. Here is a sample:
i have this code which inserts blank rows in alternate rows,
Code: Sub insertrow() ' insertrow Macro Application.ScreenUpdating = True Dim count As Integer Dim X As Integer For count = 1 To 20 If activecell.Value "" Then activecell.Offset(1, 0).Select
what changes should i make in this code to insert rows only when ther are now blank rows. So first time i run, blank rows are already there, and when i update some data at the bottom and re-run it inserts blank rows again.
I have a spreadsheet that I need to insert a blank row every other row and then merge that blank row. I can do this with the macro below. My question is that I only want the merge on each blank row to merge A:H. Example would be insert row 9 and merge A9:H9. Insert row 11 and merge A11:H11. and so on till the end.
Code: Sub insertrow() Application.ScreenUpdating = False Rows("9").Select Do While Not IsEmpty(ActiveCell) ActiveCell.EntireRow.Insert ActiveCell.EntireRow.Merge ActiveCell.Offset(2, 0).Select Loop Application.ScreenUpdating = True End Sub
I want my macro to consider the # of rows of data on a spreadsheet and insert values into columns for those rows but then stop when it hits a blank one. For simplified example below, I have 3 columns in my spreadsheet. Row 1 has headers of Location, Status, and Effective Date. The first 5 rows of data under the headers have a value in the Location column (San Jose, Oakland, etc). When I run the macro, I want it to insert a value of "ACTIVE" in the Status column for each row that has a value in the Location column. Also, a single Effective Date value is stored in a cell elsewere in the spreadsheet, and I want the macro to insert that value in the Effective Date column for each row that has a value in the Location column. When it hits a blank row - row 7 in this spreadsheet - I want it to stop.
Location| Status | Effective Date San Jose Oakland Austin Houston Phoenix
I currently am using an IF statement in the Status column fields to say if Location = blank, then blank, else "ACTIVE". That works, except that the # of rows populated in Location column could be 5 or 1,000, and inserting the formula that many times seems to quickly increase the file size.
I am trying to accomplish three things with the attached workbook. The first thing is the insert a blank row between the different part numbers, column "A" to make the sheet easier to read. The second thing is to highlight the data in light gray (A:E) leaving the blank row that was created empty. The third is to then sort the worksheet by data in column "A" to group like numbers together.
Note: Split from: VBA to insert page breaks at a blank with varying blck size
I would like my macro to add empty lines to each pages not completely filled. (you know when it removes a block from a page, there's always some free space at the bottom of that page) Is it possible to add blank row (from a certain template on another sheet that I have) until it's full?
I have a excel spread with a range of A1:H64. The spreadsheet is designed for the user to enter information into the appropriate cells, i.e. user ID in cell D4; name in cell D5; and date in cell F5. My question is instead of the user scrolling around and finding the cells that require input is there a way to set the spreadsheet where the user tabs and/or uses the enter key to move around and go only to the cells that require input and not to the ones that are locked and protected?
when cell A1=2 (A2 & A3 wilL appear the value "1") when cell A1=3 (A2, A3, A4 will appear the value "1") when cell A1=4 (A2, A3, A4, A5 will appear the value "1") when cell A1=5 (A2, A3, A4, A5, A6, will appear the value "1")
I really appreciate help from the excel gurus and expert here on my little problem. I'm rarely using excel and have a very little knowledge on VBA programming.In short, I've been requested to develop a shift schedule for my department that can automate the shift staff schedule on the monthly basis.
I've created two worksheet of which the first worksheet is represent as master data list (INPUT Worksheet) that contain with formulas. While the other worksheet is the automated shift data (REPORT Worksheet) that linked from the master data list (INPUT Worksheet).
Attached herewith is a sample of my work. As you can see,I wanted to copy comments from the input worksheets (on DUTY column) so that it will then automatically appears or updated in the shift schedule. Whenever the dropdown selection change, the data will change accordingly. On the REPORT worksheet, each cells, range D14:AH38 are referring to DUTY column month by month. I'm able to link it but it fails to copy over the comments as well. I believe that macro can resolve this, can someone help me on this?
I am having trouble trying to figure out how to insert blank cells:
I need to insert cells, in columns B through H, equal to the number of returned IDs in column B.
Please take a look at the spreadsheet I attached.
Here is the code I am using to separate the IDs in column B so that I get one ID in each A cell. When I do this it separates them great, but then I have to manually go in and insert cells down so that the rest of the rows match up with the right ID.
Sub Macro1() Dim fromCol As String Dim toCol As String Dim fromRow As String Dim toRow As String
I am trying to come up with a code that will copy column A entirely, and insert the copied cells into the first blank column. In the columns with information in them, there will always be text in the first cell, so that can be used as the test to find the first blank column, but I'm not sure how to get this done for my macro.
I need to put an extra "spacer" cell in each row that contains either 8 or 9 blank spacer cells in columns A through H or A through I, respectively, so that everything in those rows shifts to the right by one column. The problem is that all the other rows don't need any extra spacer cells. There is no pattern to the rows that need the extra spacer cell (such as every 5th row, or something).
I am try to get the following VBA macro to work; however, I keep getting hung up on errors regarding the formula I am trying to input. It is getting hung up on the apostrophes and dollar signs. I am fairly new to VBA so I am lost when it come to converting my sheet formulas to VBA.
With ActiveSheet.UsedRange.SpecialCells(xlCellTypeBlanks) .Formula = "=RAND()*0+VLOOKUP(INDIRECT(ADDRESS(1,COLUMN(),3),TRUE),INDIRECT("'"&TEXT(INDIRECT("$A"&ROW(),TRUE),"DD-MMM-YYYY")&" Inv'!"&"$J:$K",TRUE),2,FALSE)" .Value = .Value End With