Forum Discussion

TomRioux78738's avatar
TomRioux78738
Copper Contributor
Jan 04, 2024

Excel range

I am trying to perform the following sumif using variables for the ranges; this works

=SUMIF(E2394:E2614,E2839,A2394:A2614)

with 2394 in C2839 and 2614 in D2839, I am trying to do

=SUMIF("E"&C2839&":E"&D2839,E2839,"A"&C2839&":A"&D2839)

and this does not work nor does

=SUMIF(RANGE("E"&C2839&":E"&D2839),E2839,RANGE("A"&C2839&":A"&D2839))

 

how do I do this?

  • You can use the INDIRECT function. It converts a text string to the corresponding range:

     

    =SUMIF(INDIRECT("E"&C2839&":E"&D2839),E2839,INDIRECT("A"&C2839&":A"&D2839))

Share

Resources