Forum Discussion
AlbertM1960
Feb 07, 2021Copper Contributor
Possibility to have a more practical formula
Dear All, thank you in advance for your support. I have this formula which, as you can see, refers to multiple sheets, is there a simpler way of how to get the results I need (Formula Below) =IF(D5...
Steve1330
Feb 07, 2021Brass Contributor
AlbertM1960How about this?:
=SUMIF(INDIRECT("'"&SWITCH(D5,‘1’!H2,1,‘2’!H2,2,‘3’!H2,3,‘4’!H2,4,‘5’!H2,5,‘6’!H2,6,‘7’!H2,7,‘8’!H2,8,‘9’!H2,9,‘10’!H2,10,‘11’!H2,11)&"'!C23:C48,Payslip!N5,'"&SWITCH(D5,‘1’!H2,1,‘2’!H2,2,‘3’!H2,3,‘4’!H2,4,‘5’!H2,5,‘6’!H2,6,‘7’!H2,7,‘8’!H2,8,‘9’!H2,9,‘10’!H2,10,‘11’!H2,11)&"'!R23:R48)"
AlbertM1960
Feb 08, 2021Copper Contributor
Thank you so much for your answer Steve. Your formula is much more practical than what I used, but I am looking for something that will do the job even if I add more sheets. The sample formula I sent is only one of 6 formulas I am using, so if I add a sheet I will always have to modify the six formulas, in other words I need a formula that does not need the Sheet Names, if it is possible.
- Wyn HopkinsFeb 08, 2021MVP
Wyn
MVP
UTC+8