I'm trying to write a formula that returns the total purchase or sales of a share during a specific period. Each share is on it's own tab within the workbook. The formula I currently have for purchases is:
=SUMIFS(INDIRECT(A7&"!"&B10:B52),INDIRECT(A7&"!"&B10:B52),"<0",INDIRECT(A7&"!"&B10:B52),INDIRECT(A7&"!"&B10:B52),"<="&B2,INDIRECT(A7&"!"&B10:B52),INDIRECT(A7&"!"&B10:B52),">="&B2)
If I remove the Indirect and replace it with the tab reference then the formula works, however I really need this to work dynamically.
=SUMIFS(INDIRECT(A7&"!"&B10:B52),INDIRECT(A7&"!"&B10:B52),"<0",INDIRECT(A7&"!"&B10:B52),INDIRECT(A7&"!"&B10:B52),"<="&B2,INDIRECT(A7&"!"&B10:B52),INDIRECT(A7&"!"&B10:B52),">="&B2)
If I remove the Indirect and replace it with the tab reference then the formula works, however I really need this to work dynamically.