You have several problems in your formula. An attempt to set an invalid formula in a cell will raise error 1004.
What do you mean by these expressions:
Team1RoundSort[First]
[Position]
These are not valid Excel formula syntax. Are you trying to refer to named ranges? If so, you wantTeam1RoundSort!First
Position
Also, function COUNTIF has too many arguments:
COUNTIF(INDIRECT("G"&ROW()&":"&"G"&(ROWS(position)+2)),$F3:$F23,0)
COUNTIF takes range,criteria, but you have range,range,criteria.
Because the formula is hard-coded--you are not using any variables to build this formula--you should implement the formula directly in your worksheet to test it, then once you are successful simply copy it into your code.
Bookmarks