Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Durril Jansen   on Nov 15 In MS Office Category.

  
Question Answered By: Madison Campbell   on Nov 15

This is not especially easy since as you delete  rows the two blocks
end up containing fewer and fewer rows, so the distance between the
two rows  can't be relied upon to determine which row  to delete in the
other series. Another way to match the two lines is needed.
Is one of the cells in each row unique to only those two rows to be
deleted?
Will the series  always start at rows 8 and 77, both before and after
deletion? (I think the answer is no because in the code below you have
used SHift:=xlUp in both series.) Answer these and I'll come back.
Better still, send me a copy directly.

By the way, to delete the row you're on using macro code:

Selection.EntireRow.delete

(Shift:=xlUP is not needed)
This will take out the entire row even if your selection is only one
cell, entire rows if your selection spans several rows.

(In your code below, the macro does the selecting, take the first line
out and the second line will delete the currently selected range.)

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Delete row Or get search suggestion and latest updates.


Tagged: