MOD NOTE: Query has been amended - see post #3.
I have a worksheet for a game that logs a fighters stats, specifically Hit Points, What style of fight, the attack and defence, result etc.
It has a sheet named "Fighter1" with a table that all the data goes into, and an overview page. The overview sheet will give me data based on the style of fight (aggressive, Defensive, Accurate, Balanced).
I want these formulas on the Overview sheet to link to the "Fighter1" sheet dynamically so that when I add a fighter, I can copy and paste the "Fighter1" sheet and overview and all my formulas reference the new sheet the same way.
I have done this through the indirect function, and naming my Sheet and the table within that sheet "Fighter1" and this is referenced back to the overview page at A1, where A1= Fighter1.
I have been able to insert a formula for the Won:Lost column in the overview that has worked:
=(COUNTIFS(INDIRECT($A$1&"[Result]"),"Won",INDIRECT($A$1&"[Style]"),B2))&":"&(COUNTIFS(INDIRECT($A$1&"[Result]"),"Lost",INDIRECT($A$1&"[Style]"),B2))
This references the table in sheet "Fighter1" and tells me for each fighting style how many wins vs losses (in this case for Aggressive)
I have then tried to create a formula for "basic hits" that has given me the #VALUE error:
=IF(AND(INDIRECT($A$1&"[Style]")=B2,INDIRECT(A1&"[Attack Defense]"="Attack")),COUNT(INDIRECT(A1&"[[1]:[13]]"),"N/A"))
This aims to give me how many times the fighter hit his opponent, (in this case in the "Aggressive" style, and in attack only).
I have tried for ages to change the formula but cant work it out, I think I may be writing the logic function incorrectly with the indirect function?
Any Help would be greatly appreciated!
Bookmarks