I can't seem to remember how to do this. Please take a look at the attached workbook. Column D has numbers that designate the week in which each incident occurred. (Dates in Column N). The "SpinOffWeeks' macro would work fine except that not every week is accounted for. Week 16 is followed by Week 19, Week 19 is followed by Week 21, etc.
The macro as I have it now will handle the Week 16 error, but it bugs on the Week 19 error.
How do I handle the fact that the sought-after number for 'btm' isn't always i + 1?
Set top = Incidents.Columns("D:D").Find(What:=i, After:=[D4], LookIn:=xlValues)Set btm = Incidents.Columns("D:D").Find(What:=i + 1, After:=[D4], LookIn:=xlValues).Offset(-1, 0)
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.