Hello all,

I would like to enter the below formula as part of a macro:

{=SUM(SUMIF('ORIGINAL DEBTORS'!D2:D30649,Gulf!A2:A213,'ORIGINAL DEBTORS'!BF2:BF30649))/1000}

I have a list of clients, and a larger list of projects related to those clients (and others), the formula sums the debts for each client in the project list.

The problem I have is that both ranges will be different each time I run it. I have variables within the code to refer to these ranges but am not sure how to use these within the array.

Does anyone know if this is possible?

Many thanks

Rich