0

My aim is to select with VBA for example all the cells from A1 to A10 (the last one with values).

Is the function AllValueDowns applicable? If so, how does it work?

  • Does this answer your question? [Better way to find last used row](https://stackoverflow.com/questions/38882321/better-way-to-find-last-used-row) – Warcupine Jun 30 '22 at 12:34
  • Could you share the code of the `AllValueDowns` function? Basically, without it, you could do `Range("A1", Cells(Rows.Count, "A").End(xlUp)).Select` for the active sheet. – VBasic2008 Jun 30 '22 at 12:39
  • Wks_Sb.Range("A9", Range("A9").End(xlDown)).ClearContents Wks_So.Range("A9", Range("A9").End(xlDown)).ClearContents 'Wks_So.Range("A9:A50").ClearContents (The problem was that at the "wks_so" line, the code gave Error 1004) – Luca Guglielmini Jun 30 '22 at 12:49
  • `Wks_Sb.Range("A9", Wks_Sb.Range("A9").End(xlDown)).ClearContents` All calls to Range/Cells should be qualified with a worksheet reference. – Tim Williams Jun 30 '22 at 16:39

0 Answers0