You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I am working on, let's say sheet2 and have data on sheet8 starting at "G7". I never know how much data will occupy the column, so
I'd like to find the rowcount of the last value before a blank cell in column "G7".
How would the code be written. I have tried many things, all of which are not returning what I am looking for.
This only works if the colums to the left and right, and the rows above cell G7 are empty - other wise will count extra rows - so may not be exactly what you're after?
Could always write a do loop with activecell.offset, checking for blank cell - but may be a bit like overkill!!