Insert row

  • Thread starter Thread starter johnrb7865
  • Start date Start date
J

johnrb7865

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
 
It would help to show the code you have so far, and explain how the sheets
are linked.

Tim
 
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
 
Hi Tim, I got it to work.

Thanks,
John

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

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top