Hi all, I'm quite new to VBA so excuse me if I ask basics questions.
I have a spreadsheet that have x number rows of data with Label in Column B A01, A02 and etc.
I need to make separate graph based on the label
What I want to do is to make a code to:
1. Start with Row x, check if value in Bx=B (x+1) - Row to, so check B2=B3
2. continue to go down row by row until it finds value in Bx<>B (x+1) - in this case it is B23<>B24
3. Then i'd like to select column D, E, and N from the first row to the last row that has the same label value.
ActiveWindow.SmallScroll Down:=20
Range("D24:E45,N24:N45").Select
Range("N24").Activate
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range( _
"'East'!$D$24:$E$45,'East'!$N$24:$N$45")
4. once its done I'll create a graph
ActiveChart.ApplyChartTemplate ( _
"C:\Users\wgw76sy\AppData\Roaming\Microsoft\Templates\Charts\bauxite bin wear rate.crtx" _
)
5. then I'd like loop the process for the whole worksheet.
I'm sure there is a way to check instead of copy and paste code and changing the cell number one by one.
could someone please help me?
Bookmarks