VBA - Creating an Array from Excel Range

Поделиться
HTML-код
  • Опубликовано: 28 окт 2024

Комментарии • 7

  • @b99eu
    @b99eu 6 месяцев назад +1

    Thanks for the video! One issue - range to array is clear. But array to range is tricky. As long as no row or column is hidden, it works fine. But if there is something hidden (eg due to a filter) it does not work as expected. Any workarounds here?

    • @vitoshacademy
      @vitoshacademy  6 месяцев назад

      Thanks for the question! Actually, I have thought of some possible solution for that problem and it might be a working one, if the array is a smaller one. If it is big, then it probably will work as well, but more time would be needed for the loop. I have made a video here, for the solution - - ruclips.net/video/9zzY7qLu92U/видео.html. Enjoy it!

  • @querrythis
    @querrythis 7 месяцев назад +1

    Quite useful actually. Thanks for sharing your knowledge

    • @vitoshacademy
      @vitoshacademy  7 месяцев назад +1

      Glad it was helpful!

    • @querrythis
      @querrythis 6 месяцев назад +2

      @@b99eu You mistakenly posted your question to me and not the author.

  • @gopalanrc8034
    @gopalanrc8034 2 месяца назад +1

    How to use that array? Vba throws compile error

    • @vitoshacademy
      @vitoshacademy  2 месяца назад

      Hello, and thank you for your question.😊
      If you are using the code from the article, then try these steps to avoid the compiling error:
      1. Delete `Option Explicit `
      2. Make sure that you are having a worksheet named `Sheet1`
      3. Put the code in a module.
      I am away from the keyboard right now, but if the compiling error still exists, try asking in Stackoverflow.com about it, if you tag the question with #Excel and #vba, and provide the code, and explain where is the compiling error, someone will probably answer in less than 1 hour. The #vba community there is helpful.
      Enjoy your day😊