rrodwell85
New Member
- Joined
- Apr 18, 2016
- Messages
- 5
I am recording player information and computing a score for each player which is being saved in a table on a worksheet named "Players". I am trying to fill in each score output into different category columns of that table. for example if Player A scored a 9 for Category 1, the score of 9 would be put into the last empty cell of the column for category 1. I have used this code which works perfectly for recording the other information regarding the players. The issue i am running into now is with the following code for inputing the scores into their categories. The code highlighted in red will input the the correct score on the appropriate line of the column for that category but will also overwrite every line above it in that column. The code in blue just creates a new line in the table and puts the score there. How can I fix this?! 
Dim UnfilledCat As Long
UnfilledCat = Worksheets("Players").Cells(Rows.Count, 1).End(xlUp).Offset(1).Row
'fill in values
Worksheets("Players").Cells(UnfilledCat - 1, 17).Value = "=SUM(Category1)"
Worksheets("Players").Cells(UnfilledCat - 1, 18).Value = "=SUM(Category2)"
Worksheets("Players").Cells(UnfilledCat, 19).Value = "=SUM(Category3)"
Worksheets("Players").Cells(UnfilledCat, 20).Value = "=SUM(Category4)"
Help please! Thank you!!!!

Dim UnfilledCat As Long
UnfilledCat = Worksheets("Players").Cells(Rows.Count, 1).End(xlUp).Offset(1).Row
'fill in values
Worksheets("Players").Cells(UnfilledCat - 1, 17).Value = "=SUM(Category1)"
Worksheets("Players").Cells(UnfilledCat - 1, 18).Value = "=SUM(Category2)"
Worksheets("Players").Cells(UnfilledCat, 19).Value = "=SUM(Category3)"
Worksheets("Players").Cells(UnfilledCat, 20).Value = "=SUM(Category4)"
Help please! Thank you!!!!