INDEX/MATCH with Dynamic Ranges

Chris1505

Board Regular
Joined
Aug 7, 2008
Messages
60
Using Excel2007
Workbook contains 2 sheets,Combined and Reports
On Combined, columnB=Invoice No, C=Account No, E=Invoice Date
On Reports, columnAS=Invoice No, AT=Account No, AU=Invoice Date, AV=Currency
(the other columns on each sheet are not relevant at the moment)
Created Named Ranges as follows:
SAcc= =OFFSET(Reports!$AT$5,0,0,COUNTA(Reports!$AT:$AT),1)
SDte= =OFFSET(Reports!$AU$5,0,0,COUNT(Reports!$AU:$AU),1)
SRef= =OFFSET(Reprts!$AS$5,0,0,COUNTA(Reports!$AS:$AS),1)
SFnd= =OFFSET(Reports!$AS$5,0,0,COUNTA(Reports!$AS:$AS),3)
If I use Range("D5").FormulaArray="=INDEX(Reports!AV$5:AV$1932,MATCH(B5&C5&E5,SRef&SAcc&SDte,0))" I get the result I want, but if I change the formula to "=INDEX(Reports!AV$5:AV$1932,MATCH(B5&C5&E5,SFnd,0))" I get the A Value is no available to the formula or function error.
Have tried changing SFnd to only include 2 columns and using SFnd&SDte in the formula but I still can't get the right result.
This becomes even more important in a formula I need later where I am coming up against the 255 character limit.
Can you help me please
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Your first formula matches with a concatenated array. Your second formula is trying to match with a range of 3 columns, which is not the same thing.
 
Upvote 0
Sorry for the delay in replying. I see what you mean, it's nice that when I'm having a "dumb" day you are there to point me in the right direction
Thanks again
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top