0

I want to scroll a cell until it is empty and then jump to the next column and repeat this. I am still new, so I have difficulties.

There are 2 different codes. I do not know which one is closer to the solution....

For i = 1 To 1000
    If Cells(i, 2) = "" Then
    For j = 1 To 1000
        If Cells(2, j) = "" Then
    Next
Next


For i = 1 To 1000
    If Cells(i, 2) = "" Then
    
Next i

This is the Basis

enter image description here

And it must look something like this

enter image description here

AlKurdi
  • 47
  • 5
  • 2
    What are you actually trying to do with these cells? Perhaps worth looking at [how to find the last row](https://stackoverflow.com/questions/11169445/error-in-finding-last-used-cell-in-excel-with-vba). – BigBen Jun 14 '21 at 13:32
  • @BigBen I have a survey table. I need to create a macro that creates different surveys in a good looking chart. Since each survey is different, it needs to go through each cell and column until it is empty. – AlKurdi Jun 14 '21 at 13:35
  • You can use a loop over the columns and find the last row for each column as demonstrated in the linked thread. – BigBen Jun 14 '21 at 13:38
  • It "Scrolls" through all the cells, but doesn't do anything. Anything special you want it to do? – siggi_pop Jun 14 '21 at 13:42
  • @siggi_pop It must go through the table and mark it. Then it must be copied and pasted in a new table sheet to create it diagram. – AlKurdi Jun 14 '21 at 13:46
  • If I understood correctly you want to consume Table-1 and create a pivot table and pivot chart from there? Can you share an example of demo table1 and demo pivot table and chart as an excel? – Roy Jun 15 '21 at 09:42

0 Answers0