SUMIF and dynamically inputing info

  • Thread starter Thread starter John Weidenfeller
  • Start date Start date
J

John Weidenfeller

=SUMIF('Worksheet'!$4:$4,C$4,'Worksheet'!7:7)

So this formula works well, but I'd like to do two other things within it:

1) Can I pull the Worksheet name from a cell rather than have it input into
the formula.
For example in A1 have Worksheet Model 1 so that it can easily be changed to
Worksheet Model 2 or 3 etc.

2) The first range is hardcoded, but can you make the second range (in this
case 7:7) selected from a cell OR pulled from the row number you are
currently on.

For example if you are on Row 12 the example would automatically input 12:12
in the second range

Thanks
John
 
Hi John
first have a look at the INDIRECT function. e.g.
=SUMIF(INDIRECT("'" & A1 & "'!$4:$4"),C$4,INDIRECT("'" & A1 &
"'!$7:$7"))

Apply the same for your second question
 
Back
Top