That's probably a terrible thread title, but I'll explain here...
I'm basically taking over the maintenance of a complex Excel spreadsheet with lots of VB code from a much more experienced programmer who is no longer with our company. This is sort of a side project and not what we do, so there aren't many people around to ask.
So...here's the piece of code I'm working on - don't laugh. I did this to show you what I'm trying to do:
Case 25
Cells(intCurrentRow, 2).Formula = "=B" & intCurrentRow - 2 & " +B" & intCurrentRow - 1
So, I'm basically telling it that when it creates the worksheet that I'm programming for, I want the forumula in the cell to be (if we are currently on row 24, for example) =B22 + B23
So, very simple, right? I just don't know how to write this code to back up two and then one row, because the 22 and 23 could be different on different worksheets.
Let me know if you need more info, and tia!
Bookmarks