Hello,
My current formula down column B is
=SUMPRODUCT(--(Sheet1!$A$1:$A$100=TRIM($A1)),(Sheet1!B$1:B$100))

My data in Sheet1 changes regularly so I'd need the ending range to expand or compress depending on where the last row of "Net Income" is situated. For example, if "Net Income" is on row 90; then, the end range should be updated automatically to be $A$1:$A$90 so it doesn't pick up totals past the "Net Income" rows.

How do you add a search function so that the $A$100 row changes according to the new row wherever "Net Income" moves to?

Thanks,
Ricky