ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert row (https://www.excelbanter.com/excel-programming/414032-insert-row.html)

johnrb7865

Insert row
 
Hi, I used someone else's answer below to write code to find something in a
call and when it finds the character it will insert a blank row. But, I have
this sheet linked to another sheet where I also want the blank row to show.
It doesn't, it just skips the blank row and jumps to the next line. Any idea
how to insert a row and have it push the blank to the linked sheet?

Thanks,
John

Tim Williams

Insert row
 
It would help to show the code you have so far, and explain how the sheets
are linked.

Tim

"johnrb7865" wrote in message
...
Hi, I used someone else's answer below to write code to find something in
a
call and when it finds the character it will insert a blank row. But, I
have
this sheet linked to another sheet where I also want the blank row to
show.
It doesn't, it just skips the blank row and jumps to the next line. Any
idea
how to insert a row and have it push the blank to the linked sheet?

Thanks,
John




johnrb7865

Insert row
 
Hi Tim, here is what I am doing. I have switched from adding a row to adding
cells and shifting the other cells down. I thought that might help but it
doesn't. I have the sheet where the cells are inserting linked to another
sheet and when I insert the cells the formulas on the linked sheet change to
just skip the blank cell. Is there a way to have the cells that are linked
hold that absolute value (to the linked cell) even when the originating sheet
changes?

RowCount = 2
FirstRow = 2
Do While Range("A" & RowCount) < ""
If Range("G" & (RowCount)) < Range("G" & (RowCount + 1)) Then

Range("A" & RowCount + 1).Select
Selection.Insert Shift:=xlDown
Range("B" & RowCount + 1).Select
Selection.Insert Shift:=xlDown
Range("C" & RowCount + 1).Select
Selection.Insert Shift:=xlDown
Range("G" & RowCount + 1).Select
Selection.Insert Shift:=xlDown
Range("H" & RowCount + 1).Select
Selection.Insert Shift:=xlDown

RowCount = RowCount + 2
FirstRow = RowCount
Else
RowCount = RowCount + 1

End If
Loop

Thanks,
John

"Tim Williams" wrote:

It would help to show the code you have so far, and explain how the sheets
are linked.

Tim

"johnrb7865" wrote in message
...
Hi, I used someone else's answer below to write code to find something in
a
call and when it finds the character it will insert a blank row. But, I
have
this sheet linked to another sheet where I also want the blank row to
show.
It doesn't, it just skips the blank row and jumps to the next line. Any
idea
how to insert a row and have it push the blank to the linked sheet?

Thanks,
John





johnrb7865

Insert row
 
Hi Tim, I got it to work.

Thanks,
John

"Tim Williams" wrote:

It would help to show the code you have so far, and explain how the sheets
are linked.

Tim

"johnrb7865" wrote in message
...
Hi, I used someone else's answer below to write code to find something in
a
call and when it finds the character it will insert a blank row. But, I
have
this sheet linked to another sheet where I also want the blank row to
show.
It doesn't, it just skips the blank row and jumps to the next line. Any
idea
how to insert a row and have it push the blank to the linked sheet?

Thanks,
John






All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com