VBA ON YOUR OWN: For Loop through table data - Simple Excel VBA

Поділитися
Вставка
  • Опубліковано 26 сер 2024

КОМЕНТАРІ • 9

  • @gerardvaneggermond2067
    @gerardvaneggermond2067 Рік тому

    What I forgot is that the number of rows being searched is 20.

    • @SimpleExcelVBA
      @SimpleExcelVBA  Рік тому

      This is the recorded part with macro recorder, but have You try anything? Any loop? :)

    • @gerardvaneggermond2067
      @gerardvaneggermond2067 Рік тому

      @@SimpleExcelVBA No, because I don't know how to do it.

    • @SimpleExcelVBA
      @SimpleExcelVBA  Рік тому

      ​@@gerardvaneggermond2067 Did You watch this video? I prepared this and others of my videos specifically to help in such cases like yours :) Please reach me after You try something and then we can solve the issues.

    • @gerardvaneggermond2067
      @gerardvaneggermond2067 Рік тому

      @@SimpleExcelVBA What video do you want me to watch

    • @gerardvaneggermond2067
      @gerardvaneggermond2067 Рік тому

      What video do you want me to watch, that she's seen this one, I don't know if this can help me, or how I can do this.

  • @gerardvaneggermond2067
    @gerardvaneggermond2067 Рік тому

    Hello sir, maybe you can help me I made code in Vba but it is long now I would like to make it smaller and maybe "loop" and "for loop" can help with that.
    Here part of the code:
    Application.ScreenUpdating = False
    If Sheets("Menu").Range("E2") = 1 Then
    Sheets("toplay1").Select
    Range("A1").Select
    ActiveCell.Formula2R1C1 = _
    "=FILTER('S1'!R[1]C[1]:R[20]C[1],'S1'!R[1]C[1]:R[20]C[1]" "")"
    Range("B1").Select
    ActiveCell.Formula2R1C1 = _
    "=FILTER('S1'!R[1]C[5]:R[20]C[5],'S1'!R[1]C[5]:R[20]C[5]" "")"
    The Range continues until "J1" you also notice that at "c[ ] each time 4 are added, that is because the search area moves 4 columns each time, if you can help me with this I will be able to continue with the rest I think, can you help me PLEASE

    • @SimpleExcelVBA
      @SimpleExcelVBA  Рік тому

      Unfortunately the situation is not clear to me. If You want my help please describe that as for the 3rd person without any context and visibility of the range, like I am now in this situation :)