Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting # of rows depending on value in Column
I have a spreadsheet where I need to insert x number of
rows below the row where the column = "x" For ex. A B C D abc 123 xyz 3 I need excel to insert 3 rows beneath this row. Any help is appreciated, because I'm not having much luck! Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting # of rows depending on value in Column
Assume the cell with xyz is selected
x = 3 ActiveCell.offset(1,0).Resize(x,1).EntireRow.Inser t -- Regards, Tom Ogilvy Christel wrote in message ... I have a spreadsheet where I need to insert x number of rows below the row where the column = "x" For ex. A B C D abc 123 xyz 3 I need excel to insert 3 rows beneath this row. Any help is appreciated, because I'm not having much luck! Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting # of rows depending on value in Column
Sorry, I should have been more specific. I need to go
through rows 2 to 1000, checking each column 11 for the value that I need to insert that number of rows under. I have this and it "kind of" works, but it inserts the rows in the wrong place. Any more suggestions? Thanks! Sub addrows() Dim intCol As Integer Dim intRow As Integer For intRow = 3 To 1000 intCol = 11 If Worksheets("Master Schedule").Cells(intRow, intCol).Value < "" Then Rowinsert = Value ActiveCell.Offset(1, 0).EntireRow.Insert intRow = intRow + 1 -----Original Message----- Assume the cell with xyz is selected x = 3 ActiveCell.offset(1,0).Resize(x,1).EntireRow.Inse rt -- Regards, Tom Ogilvy Christel wrote in message ... I have a spreadsheet where I need to insert x number of rows below the row where the column = "x" For ex. A B C D abc 123 xyz 3 I need excel to insert 3 rows beneath this row. Any help is appreciated, because I'm not having much luck! Thanks! . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting # of rows depending on value in Column
I should also mention that Column 11 is a formula that
calculates a number -----Original Message----- Assume the cell with xyz is selected x = 3 ActiveCell.offset(1,0).Resize(x,1).EntireRow.Inse rt -- Regards, Tom Ogilvy Christel wrote in message ... I have a spreadsheet where I need to insert x number of rows below the row where the column = "x" For ex. A B C D abc 123 xyz 3 I need excel to insert 3 rows beneath this row. Any help is appreciated, because I'm not having much luck! Thanks! . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting # of rows depending on value in Column
Thank you so much! that did the trick! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting Cells in a column depending on another column but excluding duplicates | Excel Discussion (Misc queries) | |||
Count/Sum rows of a column depending on criteria from drop-down li | Excel Worksheet Functions | |||
inserting rows where a formula is inuse for that column | Setting up and Configuration of Excel | |||
Inserting a Date depending on a spereate Cell Value | Excel Discussion (Misc queries) | |||
Merge Rows depending on value of the first column | Excel Worksheet Functions |