You really should try to avoid using Select
entirely. Recoding a macro will produce this code but you should then alter the code to remove it. Even when done perfectly, it can go badly for instance if the user clicks the screen while it's running.
For the first part of your example, you could do the following:
With ThisWorkbook.Worksheets("Nostro bals - 5010")
.Range("A2:F1000").ClearContents
End With
For the second part, your code is finding the bottom of the data by using the equivalent of CTRL-Down
from A1. This means if there is a break in the data, it will only clear down to that row. If that is your intention, then you can use the following:
With ThisWorkbook.Worksheets("FX rate")
ex_end_row = .Cells(1, 1).End(xlDown).Row
.Range("A3:B" & ex_end_row).ClearContents
End With
However, if you actually want it to find the last cell in column A with data in it, regardless of breaks etc, then you could use this, which starts at the very bottom of column A and then uses CTRL-Up
:
With ThisWorkbook.Worksheets("FX rate")
ex_end_row = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range("A3:B" & ex_end_row).ClearContents
End With
Note, with either of these, you should declare your ex_end_row beforehand:
Dim ex_end_row As Long