I have an excel 2003 spreadsheet I'm creating for tracking troop number in battles for a game I play via a user form.
All is going well and I got over what I thought was the hard part of getting the data entry UI doing what it should.
Now it comes to the report part.
Consider a worksheet like this with these 5 columns
UserID (String), Battle (String), TroopType1 (Integer), Trooptype2(Integer), TroopType3(Integer)
Currently the user form for calculating totals of the troop types is applying an auto filter which works fine. I thought I could apply a subtotal on that to get the total number of trooptype1, trooptype2 etc... But for the life of my, I can't get it to go.
The code snippet below shows how I achieve the auto filter and it filters fine on the battle column. Now all I need is the total of column 3 (for TroopType1).
Also as a note I'm writeing the VBA and spreadsheet this using Excel 2007, but am wanting to to be compatable with Excel 2003 (So I'm saving at an excel 2003 spreadsheet).
Any help you could probive in my blond moment would be appriciated.
Set w = Worksheets("Race1")
w.Cells.AutoFilter field:=2, Criteria1:="=" & cmbBattle.Value