Basically i need to get a list of each different type of issue from the first sheet and then display on the second.
The first sheet has 1 row which is just titles for the columns and then 4 rows with data.
It was wokring but I think i accidently changed something i cant work out whats wrong now, if someone can see an issue or if theres a better way of doing this then im all ears.
Sub ListQueryTypes()
'Create Variables'
Dim numberOfIssues As Integer
Dim numberOfMacroIssues As Integer
Dim numberOfReportIssues As Integer
Dim numberOfTechnicalIssues As Integer
Dim numberOfTrendIssues As Integer
Dim cellValue As String
'Set query register as active worksheet'
Sheets("Query Register").Activate
'set range for search'
Set myRange = Range("G:G")
'Minus 1 for the first row being column name'
numberOfIssues = Application.WorksheetFunction.CountA(myRange)
'Do, for as many issues as were found previously'
For i = 2 To numberOfIssues + 1
cellValue = ActiveSheet.Cells(i, 7).Value
Select Case cellValue
Case "Macro"
numberOfMacroIssues = numberOfMacroIssues + 1
Case "Report"
numberOfReportIssues = numberOfReportIssues + 1
Case "Technical"
numberOfTechnicalIssues = numberOfTechnicalIssues + 1
Case "Trend"
numberOfTrendIssues = numberOfTrendIssues + 1
End Select
Next i
Sheets("Inventory").Activate
ActiveCell = Cells(2, 2)
ActiveCell.Value = numberOfMacroIssues
ActiveCell.Offset(1).Value = numberOfReportIssues
ActiveCell.Offset(2).Value = numberOfTechnicalIssues
ActiveCell.Offset(3).Value = numberOfTrendIssues