Log in

View Full Version : SUM Values From Across Different Sheets Based On Multiple Criteria



paul_pearson
08-10-2013, 04:35 PM
I added a new group into Userform and altered the code to suit...that part works

On main page I have also added 2 new cells (Fast and Slow).Example in Tims sheet if there is WALK AND FAST WALK in "Type" Column then it adds the amounts from the "Amount" column for Walk and Fast Walk and places TOTAL in MAIN!H9 (SLOW) for that date It sees in H6...will change daily

On main page I have also added 2 new cells (Fast and Slow).Example in Tims sheet if there is run,jog and sprint in "Type" Column then it adds the amounts from the "Amount" column for run,jog and sprint and places TOTAL in MAIN!H10 (FAST) for that date It sees in H6...will change daily

Thanks

Paul

Admin
08-10-2013, 05:30 PM
Hi

You can try this in H9

=SUM(SUMIFS(INDIRECT(H5&"!d4:d100"),INDIRECT(H5&"!b4:b100"),B3,INDIRECT(H5&"!e4:e100"),{"walk","fast walk"}))

paul_pearson
08-10-2013, 07:51 PM
Thanks Admin

That worked but I have changed the sheet tabs to TIM A,GREG B,PETER C as well as the headings in MAIN Sheet (G5,G13,G21)....the formulas have now a REF error...Now that MAIN Sheet (cells G5,G13,G21) have been merged there is an error

I changed the formula from H5 to G5 but still error....is the merged cell causing the issue?

Thanks

Paul

Admin
08-10-2013, 09:42 PM
Hi

it would be

=SUM(SUMIFS(INDIRECT("'"&G5&"'!d4:d100"),INDIRECT("'"&G5&"'! b4:b100"),B3,INDIRECT("'"&G5&"'!e4:e100"),{"walk","fast walk"}))

And your sheet is ' TIM A', delete the space.

Also if there is a space in sheet name we need to wrap the sheet name in single quote while using formula INDIRECT.