Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
endxldown

ResolvedVersion Standard

Ashish has attended:
Excel VBA Intro Intermediate course

End(xldown)

If I have spaces or blanks in my data list End(xldown) will not work, how can I get this work (find the last row)with blank records at random points in my data?

RE: End(xldown)

Hi ashish

Thank you for your question

If your table contains random blank records then the simplest approach is to use the current region property of the activecell object

The following code would select the surronding cells of cell b2, when this is a cell in the table

Range("b2").CurrentRegion.Select



Hope this is useful, if you have any further queries please do not hesitate to get back to me

Regards

Stephen

Excel tip:

Formula for last day of month

In some cases it is necessary to find the last day of a month for a given date. If you use the following formula, you can achieve this, ie; if you have a column of dates, use this formula to find the end of month for each day by using the fill handle. The formula is as follows, and assumes in this example that the first date in question is in cell C5, in any other cell type; =DATE(YEAR(C5),MONTH(C5)+1,1)-1

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.35 secs.