The Range Object returned will of course be the Range where the value being sought resides.The single best way to get the code needed for the Find Method is to record a macro using it on any Excel Worksheet
Use VBA to find last cell with data in a row
How can I set excel to find the last data-filled cell in a row, and how can I then use that information to set the range for my chart? I don't really have any code so far, as I'm not sure how to start this
I think I'll go with the Find function and your suggestion of changing the 'After' argument to the last cell (and yes, you're right to be picky - I should qualify the counts with the worksheet name) as it seems to do everything I want, and it calculates them in the blink of an eye. Up till now I had just used the code above which I ripped from somewhere on the internet (like this site) without understanding the components of the Find function
Find the last cell address using vba excel - Stack Overflow
Why do you think the existing code samples are inapplicable? Finding the row number of the last used cell in a column sounds like exactly what you need. I was wondering what code would work so that I can either find the row number and somehow tie it in with my range code so that it will equal "A" + lastrownumber? OR if there is code that will provide the column and row number together? If I have missed the link to the correct answer a simple link will do as well and I apologize for the post and your time
excel - Error in finding last used cell in VBA - Stack Overflow
So if for example you enter something in B3 and something else in H8 and then later on delete the contents of H8, pressing Ctrl + End will still take you to H8 cell. This criterion usually produces unexpected results, but it may also be intentionally exploited (less often, surely), e.g., to highlight or print specific regions, which may eventually have no data
No comments:
Post a Comment