So Im trying to make a loop that takes information from each columns in order and creates a bar chart. I figured out how to detect how many data is in a column but i cant make the loop move on to the next column automatically please help, anything would be appreciated
heres my code, it only makes a chart with information obtained from Column E and F

Dim m As Integer
Sheets("Summary").Select
For i = 2 To 30 'check and only add count if the information exists
If Not IsEmpty(Cells(i, 5)) Then
m = m + 1
End If
Next i

Charts.Add
ActiveChart.ChartType = xl3DBarClustered
ActiveChart.SetSourceData Source:=Sheets("Summary").Range("E" & 2 & ":F" & m) ' <--------dont know how to increment E and F, I have rows covered but not columns
ActiveChart.FullSeriesCollection(1).Select
ActiveChart.FullSeriesCollection(1).ApplyDataLabels
ActiveChart.Legend.Delete
If Len(Sheets("summary").Cells(1, 5)) > 31 Then 'if the name used for the sheet is larger than 31 characters, shorten it

ActiveSheet.Name = Left(Sheets("summary").Cells(1, 5), Len(Sheets("summary").Cells(1, 5)) - 5)
Else
ActiveSheet.Name = Sheets("summary").Cells(1, 5)
End If