wildturkey
Board Regular
- Joined
- Feb 21, 2006
- Messages
- 189
- Office Version
- 365
- Platform
- Windows
HI, I've been using this formula for some time and I can just about fudge the way it works.
=SUMPRODUCT(SUMIF(INDIRECT("'"&Courses&"'!b:b"),$B4,INDIRECT("'"&Courses&"'!"&SUBSTITUTE(SUBSTITUTE(REPT(ADDRESS(1,COLUMNS($A:G),4),2),1,":",1),1,""))))
I understand its looking at the named range 'Courses' and picking up individual sheet names there, and if they exist adding up their values based on cell $B4, but could someone please explain the SUBSTITUTE(SUBSTITUTE(REPT(ADDRESS(1,COLUMNS($A:G),4),2),1,":",1),1,"")))) element, especially how the $A:G part works and whether the following digits have any impact on the column that gets summed - or is that purely down to the £A: G element?
Many thanks
=SUMPRODUCT(SUMIF(INDIRECT("'"&Courses&"'!b:b"),$B4,INDIRECT("'"&Courses&"'!"&SUBSTITUTE(SUBSTITUTE(REPT(ADDRESS(1,COLUMNS($A:G),4),2),1,":",1),1,""))))
I understand its looking at the named range 'Courses' and picking up individual sheet names there, and if they exist adding up their values based on cell $B4, but could someone please explain the SUBSTITUTE(SUBSTITUTE(REPT(ADDRESS(1,COLUMNS($A:G),4),2),1,":",1),1,"")))) element, especially how the $A:G part works and whether the following digits have any impact on the column that gets summed - or is that purely down to the £A: G element?
Many thanks