I'm very new to Excel as I do most in Google Sheets, and I'm not sure the best way to simplify my formula. It 'worked' in Google Sheets, but Excel has a very understandable character limit in formulas. Below is an example, as it continues on for another 18 different sheets. I am adding rows if a specific cell equals another cell. I've also attached an example file, with this formula in Main!B6. Any suggestions to simplify this formula?
=IF(A6="","",SUM(IF('x01'!A1=A6,SUM('x01'!C1:AD1),),IF('x01'!A2=A6,SUM('x01'!C2:AD2),),IF('x01'!A3=A6,SUM('x01'!C3:AD3),),IF('x01'!A4=A6,SUM('x01'!C4:AD4),),IF('x01'!A5=A6,SUM('x01'!C5:AD5),),IF('x01'!A6=A6,SUM('x01'!C6:AD6),),IF('x01'!A7=A6,SUM('x01'!C7:AD7),),IF('x01'!A8=A6,SUM('x01'!C8:AD8),),IF('x01'!A9=A6,SUM('x01'!C9:AD9),),IF('x01'!A10=A6,SUM('x01'!C10:AD10),),IF('x01'!A11=A6,SUM('x01'!C11:AD11),),IF('x01'!A12=A6,SUM('x01'!C12:AD12),),IF('x01'!A13=A6,SUM('x01'!C13:AD13),),IF('x01'!A14=A6,SUM('x01'!C14:AD14),),IF('x01'!A15=A6,SUM('x01'!C15:AD15),),IF('x01'!A16=A6,SUM('x01'!C16:AD16),),IF('x01'!A17=A6,SUM('x01'!C17:AD17),),IF('x01'!A18=A6,SUM('x01'!C18:AD18),),IF('x01'!A19=A6,SUM('x01'!C19:AD19),),IF('x01'!A20=A6,SUM('x01'!C20:AD20),),IF('x01'!A21=A6,SUM('x01'!C21:AD21),),IF('x02'!A1=A6,SUM('x02'!C1:AD1),),IF('x02'!A2=A6,SUM('x02'!C2:AD2),),IF('x02'!A3=A6,SUM('x02'!C3:AD3),),IF('x02'!A4=A6,SUM('x02'!C4:AD4),),IF('x02'!A5=A6,SUM('x02'!C5:AD5),),IF('x02'!A6=A6,SUM('x02'!C6:AD6),),IF('x02'!A7=A6,SUM('x02'!C7:AD7),),IF('x02'!A8=A6,SUM('x02'!C8:AD8),),IF('x02'!A9=A6,SUM('x02'!C9:AD9),),IF('x02'!A10=A6,SUM('x02'!C10:AD10),),IF('x02'!A11=A6,SUM('x02'!C11:AD11),),IF('x02'!A12=A6,SUM('x02'!C12:AD12),),IF('x02'!A13=A6,SUM('x02'!C13:AD13),),IF('x02'!A14=A6,SUM('x02'!C14:AD14),),IF('x02'!A15=A6,SUM('x02'!C15:AD15),),IF('x02'!A16=A6,SUM('x02'!C16:AD16),),IF('x02'!A17=A6,SUM('x02'!C17:AD17),),IF('x02'!A18=A6,SUM('x02'!C18:AD18),),IF('x02'!A19=A6,SUM('x02'!C19:AD19),),IF('x02'!A20=A6,SUM('x02'!C20:AD20),),IF('x02'!A21=A6,SUM('x02'!C21:AD21),),))
SOLUTION
Bookmarks