Index and Match function issue

mrsushi

Board Regular
Joined
Nov 18, 2006
Messages
180
Office Version
  1. 2010
Have a problem where if the fund isn't on the tab, it randomly returns a value. Is this formula the best? Can it be corrected or improved?



INDEX('Paste Summary'!$L:$L,MATCH(C$1,IF('Paste Summary'!$I:$I="Total NAV",'Paste Summary'!$C:$C,"")))



Where C1 = 1150



In the summary tab have column data headed by



Column C - Fund ie 1000, 1150, 1120 etc

Column I – Asset Description

Column L – Values
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Try
Excel Formula:
=IFERROR(AGGREGATE(15,6,'Paste Summary'!$L$2:$L$1000/('Paste Summary'!$I$2:$I$1000="Total NAV")/('Paste Summary'!$C$2:$C$1000=C$1),1),"")
 
Upvote 0
Thanks Jason, Worked a treat! :)(y)
Just a question, 15 - selection of Aggregate, but what is the 6 representing?

Also, your formula is specifying a range from 2 - 1000. Can this be rewritten as $L:$L?


Similarly, the below is working to some degree, but how can this be rewritten to using your formula as above?
Where C4 = 1115

=INDEX('PASTE LP99'!$W:$W, MATCH(C$4, IF('PASTE LP99'!$B:$B=Split!$A5, 'PASTE LP99'!$E:$E),0))

Many thanks
 
Upvote 0
From the aggregate options, 15 is used to return the first value that meets the criteria. 6 is used to ignore errors (which are deliberately created to out the random results from your formula).

You can try it with full columns but it is not recommended, it would likely be very slow to process. I went 2-1000 as an example, it would be best to keep it realistic. A full column is over 1 million records (empty cells are still processed if they are included in the formula range), if you're using less than 10k rows then over 99% of the processing effort (and the time it takes) is being wasted.

For the second formula you asked about, are the results still numeric? The method that I suggested will not work with text, although it can be modified to do so if needed.
 
Upvote 0
From the aggregate options, 15 is used to return the first value that meets the criteria. 6 is used to ignore errors (which are deliberately created to out the random results from your formula).

You can try it with full columns but it is not recommended, it would likely be very slow to process. I went 2-1000 as an example, it would be best to keep it realistic. A full column is over 1 million records (empty cells are still processed if they are included in the formula range), if you're using less than 10k rows then over 99% of the processing effort (and the time it takes) is being wasted.

For the second formula you asked about, are the results still numeric? The method that I suggested will not work with text, although it can be modified to do so if needed.
HI Jason, Many thanks for the information regards to the function.

Regards to the second formula, this is still numeric. Tried to tweak it to work, but not having much success....
 
Upvote 0
For the second one, again using 2-1000 as an example
Excel Formula:
=IFERROR(AGGREGATE(15,6,'PASTE LP99'!$W$2:$W$1000/('PASTE LP99'!$B$2:$B$1000=Split!$A5)/('PASTE LP99'!$E$2:$E$1000=C$4),1),"")
The principle of the formula would be rng/(rng1=crit1)/(rng2=crit2) where rng refers to the list to return (the INDEX range), then rng1 and crit1, rng 2 and crit 2, etc are a range to look in and a value to look.

You can add as many pairs of (rngn=critn) as required, with the division operator separating them.

The 1 at the end of the formula is to return the first (only) match found, the double quotes leave the cell blank in the case that there is no match for the given criteria.

Hope that makes sense.
 
Upvote 0
For the second one, again using 2-1000 as an example
Excel Formula:
=IFERROR(AGGREGATE(15,6,'PASTE LP99'!$W$2:$W$1000/('PASTE LP99'!$B$2:$B$1000=Split!$A5)/('PASTE LP99'!$E$2:$E$1000=C$4),1),"")
The principle of the formula would be rng/(rng1=crit1)/(rng2=crit2) where rng refers to the list to return (the INDEX range), then rng1 and crit1, rng 2 and crit 2, etc are a range to look in and a value to look.

You can add as many pairs of (rngn=critn) as required, with the division operator separating them.

The 1 at the end of the formula is to return the first (only) match found, the double quotes leave the cell blank in the case that there is no match for the given criteria.

Hope that makes sense.
Many thanks Jason for the explanation and many thanks for making the formula work.
Much appreciated. (y)
Regards
M
 
Upvote 0

Forum statistics

Threads
1,215,231
Messages
6,123,754
Members
449,119
Latest member
moudenourd

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