=SUM((OFFSET(INDIRECT(ADDRESS(MAX((Sheet1!H5:H369="PAID")*ROW(Sheet1!H5:H369)),MAX((Sheet1!H5:H369="PAID")*COLUMN(Sheet1!H5:H369)),4)),1,-2):Sheet1!H369))
In sheet one i have a table. Column F is a list of totals (hours worked) and Column H is reserved to write in "PAID" by the user.
a SUM of column F would total all the hours in the list. What I am trying to accomplish with the above code is to total all the hours worked in the list starting from the row after the user has input "PAID" (the hours before that have essentially already been paid and we need to know what money is owed AFTER that...)

The code was successful when it was one the same sheet as the table and I removed the sheet references from the above code but when I tried to put it into a different sheet, even after CTRL SHIFT ENTER for an array, it returns a #VALUE!

Can anyone help me?