Hi guys,
My task is simple, but for some reason I'm confused on how to go about it so please direct me in the right way.
I want to count the number of time the number 4,3,2 and 1 appear in one of the columns in my table. I then want to create a new table listing these values, and create a chart in a new sheet. I've manually used the COUNTIF function to achieve this.
I now want to use VBA. I understand how to create and open a new sheet in VBA and also how to draw the chart of these values, however I am not finding much resources on how to create a new table and record the number of times 4,3,2 ,1 appear.
If possible, after creation of new sheet, I want it to populate with a table such as :
1 | 4
2 | 6
3 | 5
4 | 1
which means the number one appeared 5 times, the number 2 appeared 6 times etc etc. And I understand how to plot the graph on VBA.
Please help me out.
Curent Sub CreateSheet()<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"> With ThisWorkbook
.Sheets.Add(After:=.Sheets(.Sheets.Count)).Name = "Temp"
End With
End Sub</code>
My task is simple, but for some reason I'm confused on how to go about it so please direct me in the right way.
I want to count the number of time the number 4,3,2 and 1 appear in one of the columns in my table. I then want to create a new table listing these values, and create a chart in a new sheet. I've manually used the COUNTIF function to achieve this.
I now want to use VBA. I understand how to create and open a new sheet in VBA and also how to draw the chart of these values, however I am not finding much resources on how to create a new table and record the number of times 4,3,2 ,1 appear.
If possible, after creation of new sheet, I want it to populate with a table such as :
1 | 4
2 | 6
3 | 5
4 | 1
which means the number one appeared 5 times, the number 2 appeared 6 times etc etc. And I understand how to plot the graph on VBA.
Please help me out.
Curent Sub CreateSheet()<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"> With ThisWorkbook
.Sheets.Add(After:=.Sheets(.Sheets.Count)).Name = "Temp"
End With
End Sub</code>