1

I have sheet where the first two columns provide a section and subsection so each row is unique and corresponds to a row in another sheet with different data but with the same section and subsection. So it looks something like this:

Sheet 1:
Section    SubSection   DataA
1          1            abc
1          2            def

Sheet2:
Section    SubSection   DataB
1          1            abc
1          2            def

Right now using the Worksheet_Change sub I have it so if the user is only changing one cell it will take that change and push it Sheet2. So if def becomes xyz it will become xyz on Sheet2. What I want to happen is if the user deletes section "1.2" altogether it will remove it from Sheet2 as well. I know it'll start with:

If Target.Cells > 1 Then

but I don't know where to go from there. I'd also like to be able to check if they are adding a whole new row. So how would I start this? I'm sure I can figure out how to actually do the deleting and inserting part I just need to figure out how to tell if Target is Deletion or Insertion. Thanks a bunch!

Community
  • 1
  • 1
Patman
  • 95
  • 9
  • 1
    See this [Excel VBA-Determine whether user are adding rows or deleting rows](http://stackoverflow.com/questions/7479721/excel-vba-determine-whether-user-are-adding-rows-or-deleting-rows) – brettdj Apr 17 '14 at 05:05

0 Answers0