Excel INDEX MATCH retrieves information randomly - arrays

I'm have an issue that the Excel INDEX (with double MATCH) funtion retrieves data what it seems randomly. I have the following data set (Imgur).
What it needs to do: Display the pax count on the schedule at the correct position if a match between the gatenumber (columA) and the time (row1) is found in the data list.
I used: {=IFERROR(INDEX($I$54:$I$91,MATCH($A2&I$1,$H$54:$H$91&$G$54:$G$91,0)),"")}
The issue: some values are retrieved, some not (marked in gray) without any differences in the function/data.
Remarks:
All cell formats are the same.
All cells are set as an array {}.
Increasing the Index Array to all 3 columns with the data and adding [column_num] 3 does not help.
If I change values like the time in the list some move to the correct new position, some not.
Software version is (Excel) Professional Plus 2013.
Any help on what the cause of this problem could be, a solution or an alternative method would be greatly appreciated!

Related

How to Use Excel Spill Range To Convert Multi-Column Array into Two Column Array

I'm trying to create a spill-range solution to turn a list of dates and multiple columns of names into a structured two columns of data. I can do this using VBA, but because this will be automated and web-based, I need a spill-range solution.
A sample file of my situation can be found in this file.
As you'll see below, I have a list of a set of employees ("slackers") who have requested vacation/PTO during December. I've created a list of two spill range formulas that are:
A Column listing all days December
A list of slackers requesting the day off (array going horizontal).
Part 2 presents the problem as the the number of slackers is inconsistent and I'm not sure how to create additional dates for each row. Thus my problem is how to structure a filter/Array formula to list each employee, by day.
In the following tab, you can see my desired outcome. I've used a macro to generate this, but because this is web-based, I cannot use it.
I've tried a variety of mixing and matching array formulas and filters but cannot find a way to populate the date with each name.
While my question is scoped to addressing this conversion from multi-column to 2-column approach, I am happy to hear comments addressing the overall concept.
Here it is with your datatable:
=LET(
end, PtoRequestsTable[End],
strt, PtoRequestsTable[Start],
us, PtoRequestsTable[Slacker],
usCnt, COUNTA(us),
lst, DATE(YEAR(TODAY()),12,1),
led, DATE(YEAR(TODAY()),12,31),
dtSq, INT(SEQUENCE((led-lst+1)*usCnt,,lst,1/usCnt)),
md, MOD(SEQUENCE((led-lst+1)*usCnt,,0),usCnt)+1,
ussl, IF((INDEX(end,md)>=dtSq)*(INDEX(strt,md)<=dtSq),INDEX(us,md),""),
SORT(FILTER(CHOOSE({1,2},dtSq,ussl),ussl<>""),1,-1)
)
It will automatically grow and shrink with the table. It also has the start and end dates as inputs.
You may need to adjust maxWidth if there are more than 8 potential slackers.
=LET(maxWidth,8,
days,ByDay!A2#,
slackerBox,OFFSET(days,,1,,maxWidth),
ndx,SEQUENCE(ROWS(days)*maxWidth),
ndxDay,INT(ndx-1)/maxWidth+1,
slackerList,INDEX(slackerBox,ndxDay,MOD(ndx-1,maxWidth)+1),
FILTER(CHOOSE({1,2},INDEX(days,ndxDay),slackerList),slackerList<>0))

Using Excel Functions to Get Data into a Single Cell

I'm working with the Bloomberg Add-in on Excel to gather some data. The problem I'm having is to get all the data into a single cell. For instance, I want to get the daily change % for the past 5 fives for IBM. The formula I am using is:
=BDH("IBM US Equity","CHG_PCT_1D","11/9/2012","","Array","TRUE")
I made this using the Formula Builder, so I'm not sure why this isn't working. It returns error message: "#N/A Invalid Parameter: Invalid Override Field ID Specified"
If I exclude the whole array part, then it returns the data I want but in 1827 or so different cells. Any way I can get all of these in one cell?
Thanks
Use the working method that fills cells A1 through A1827.Then in cell B1 enter:
=TEXTJOIN("",TRUE,A1:A1827)
This cell will contain all the data you require.

return array of #NA

I have a list of item numbers.Some of them don't have details associated with them. I would like the list of item numbers that don't have info associated. they can be identified with #N/A error.
I'm running excel 2007.
i am using this array formula to return the associated details. which are in column A
=IF(ISERROR(VLOOKUP(J12,A:H,{2,3,4,5,6,7,8},FALSE)),"",VLOOKUP(J12,A:H,{2,3,4,5,6,7,8},FALSE))
if the lookup can't find the associated item number in column a it returns blanks, otherwise it returns the associated data.
the ones that error, i need a list of those.
is there a formula or a vba macro to get this information?
thanks for your time
Ian
As XORLX said: why you are using {values} as its picking items from column B?
Anyway you can change your formula with
=IFERROR(VLOOKUP(J12,A:H,{2,3,4,5,6,7,8},FALSE),"N/A")
So in case of error it will give N/A which you can later filter.
But I think you want result as in this pic
Sample File
Where
K6=IFERROR(INDEX(A:H,MATCH(J6,A:A,0),(IF(INDIRECT("B"&MATCH(J6,A:A,0))<>"",2,IF(INDIRECT("C"&MATCH(J6,A:A,0))<>"",3,IF(INDIRECT("D"&MATCH(J6,A:A,0))<>"",4,IF(INDIRECT("E"&MATCH(J6,A:A,0))<>"",5,IF(INDIRECT("F"&MATCH(J6,A:A,0))<>"",6,IF(INDIRECT("G"&MATCH(J6,A:A,0))<>"",7,IF(INDIRECT("H"&MATCH(J6,A:A,0))<>"",8))))))))),"N/A")
In my example I am looking for Joy which is in Row 2.
Now after finding Row 2 it will go and check 2nd Column B which is empty so it will go for 3rd C and so on and when will return the data from the 1st column and if find nothing then will return error.

Excel array function return all fields found with index and match

Here is the array function I am using:
=IFERROR(INDEX('Master Data'!$D$2:$D$153,MATCH(1,(B9='Master Data'!$J$2:$J$153)*('Master Data'!$W$2:$W$153=1),FALSE)),"")
Where D is the name of a project, J is a persons name and W is a flag to check if they are assigned to a project either equal to 0 or 1. B is also an instance of the persons name that is built up from a seperate list.
It basically references the master data and returns any rows with the criteria specified. However a single person may have two instances where the assigned flag is equal to 1 and thus as the master data is filtered different results are given back by the function.
Another problem I have is that the persons name is not repeated either so maybe the best way would be to start populating the names in the assigned table from the master data as well.
As requested here is an slight example of the data. On the left is the master data, the middle is the assigned table thats being built and the right is the list of employees that builds up the names in the assigned table.
Please note that there is two instances of david smith in the master data but only one in the assigned table as its being built with the employees list.
What I was thinking was to build up the names in the assigned table from the master data using an array where the assigned indicator is equal to 1 and to completely scrap the employees list, but I'm really unsure if this is possible or how to go about it.
Or even if there was some sort of way to select a few columns from the master data where the assigned indicator = 1?
Not sure if I understood it right. But the problem how to list multiple lookup results is achievable with SMALL function in combination with getting an array of ROW numbers.
For example have a sheet like this:
Then formulas are:
F4 downwards:
=COUNTIFS($B:$B,$E4,$C:$C,1)
G4 and then copied in G4:J8:
{=INDEX($A$1:$A$1000,SMALL(IF($B$1:$B$1000=$E4,IF($C$1:$C$1000=1,ROW($1:$1000))),COLUMN(A:A)))}
But if the goal is only to have a filtered list of all assigned resources, then the formulas could be
E13:
{=INDEX($B$1:$B$1000,MATCH(1,($C$1:$C$1000=1)*1,0))}
E14 downwards:
{=INDEX($B$1:$B$1000,MATCH(1,(COUNTIF($E$13:$E13,$B$1:$B$1000)=0)*($C$1:$C$1000=1),0))}
Formulas in {} are array formulas. These are entered into the cell without the curly brackets and then [Ctrl]+[Shift]+[Enter] is pressed to finish.
I have not handled the error values for better understanding the formulas. You can later hide the error values with IFERROR. You seems to know how to do this.

Create array with vlookup

I want to conditionally grab lines from a database-style spreadsheet in Google Spreadsheets (a list with a name, location, description, price) after checking the value with a vlookup - I've used this a while ago and expected it to CONTINUE an array across for the other columns next to the one 'looked up', but it seems my memory fails me here and it just retrieves the 'searched out' value.
=vlookup("Yes",'All 2014-15'!A2:G,2)
This formula basically finds the first value of the desired rows and should create a 'Selected items from 2014-15' list, but I can't work out how to expand it to produce a list of all the rows I want. Is there a simple way to retrieve this, I've tried playing with arrayformula but no success.
I can change the index simply to get the other values across, but if this could be filled out through an array too that would be preferable...?
Can you try this...
=FILTER('All 2014-15'!A2:G,'All 2014-15'!A2:A="Yes")
Edit:
As suggested by Immx, added apostrophes to sheet name and the second range changed to A2:G to A2:A assuming the yes/no data is in A column.

Resources