This is my first posting on the message board, so bear with me. I have a spreadsheet with two worksheets, DataSource and Summary. The DataSource has the following column headings: Company, product, country, cheque payment, cheque date, date banked, invoice number, invoice date, usage start, usage end date, amount.
In the summary sheet I have used a offset/indirect direct method to rip out payment totals by company, by product. Unfortunately, this method has run into trouble when trying to evaluate if a complete month has been paid for and how much. For example, company A pays $1000 for usage 1-jan-02 to 31-jan-02. In the summary sheet the table shows month start and end dates are running down with company across. In the intersect for january and company A, should read $1000 PAID. If the usage date was 1-jan-02 to 15-jan-02. It should read in the summary, $1000 unpaid 16 days. Please seee examples below of methods I have tried so far.
{=MATCH(startdate,VLOOKUP(company,COUNTA(OFFSET(DataSource!N7,0,0,10000,Datasource_startdateRange),Datasource_startdateRange,FALSE),0))}
=IF(OFFSET(INDIRECT(DataSource),0,company&startdate,activeRows,1),company&startdate,if(OFFSET(INDIRECT($L$8),0,company&enddate,DataSource,1),company&enddate,(INDIRECT($L33),0,13,$M33,1)),""),0)
Both these methods are resource hungry, painful to edit/don't work.
There must be an easier way? Please advise on method of manipulation of the datasource rather than direct formula help. If there is a quicker VBA method, that would good.
regards,
Justin
In the summary sheet I have used a offset/indirect direct method to rip out payment totals by company, by product. Unfortunately, this method has run into trouble when trying to evaluate if a complete month has been paid for and how much. For example, company A pays $1000 for usage 1-jan-02 to 31-jan-02. In the summary sheet the table shows month start and end dates are running down with company across. In the intersect for january and company A, should read $1000 PAID. If the usage date was 1-jan-02 to 15-jan-02. It should read in the summary, $1000 unpaid 16 days. Please seee examples below of methods I have tried so far.
{=MATCH(startdate,VLOOKUP(company,COUNTA(OFFSET(DataSource!N7,0,0,10000,Datasource_startdateRange),Datasource_startdateRange,FALSE),0))}
=IF(OFFSET(INDIRECT(DataSource),0,company&startdate,activeRows,1),company&startdate,if(OFFSET(INDIRECT($L$8),0,company&enddate,DataSource,1),company&enddate,(INDIRECT($L33),0,13,$M33,1)),""),0)
Both these methods are resource hungry, painful to edit/don't work.
There must be an easier way? Please advise on method of manipulation of the datasource rather than direct formula help. If there is a quicker VBA method, that would good.
regards,
Justin