Aug 16 2018 11:50 AM
Hello all,
I have created a spreadsheet based on Magic the Gathering, so far its all good and working as it should. What I'm struggling with is this..... I have card name in B3 and the number of cards I have in D3, now if I didn't have the card then the value of D3 would be 0. What I would like is a list/Column of the cards that I don't yet have and this would update as the values change etc.
So I could be overlooking this or over complicating it but I can't figure it out.
I'm guessing an IF but after that I'm not sure.
Any help would be great!
Aug 16 2018 12:22 PM
It can be done with an advanced version of index match.
The formula looks something like this:
=INDEX(cards[Card],SMALL(IF(cards['# Owned]=0,ROW(cards['# Owned])-ROW(INDEX(cards['# Owned],1,1))+1),ROW(A1)))
and uses an array function to build a list of all the cards where you have 0 owned, then uses the small function to return the nth result in that list. In this case i've used row(a1) as the second parameter in the small so that when you drag it down it increments and gives you the next result.
Have a look at the attached spreadsheet. Because this is an array formula you need to enter it with ctrl+shift+enter to make it work
Aug 16 2018 02:02 PM
To avoid array formula that could be
=IFERROR(INDEX(cards[Card],AGGREGATE(15,6,1/(cards['# Owned]=0)/NOT(ISBLANK(cards['# Owned]))*ROW(cards[Card])-ROW(cards[[#Headers],[Card]]),ROW(A1))),"")
and attached
Aug 16 2018 03:15 PM
Thank's, that's exactly what I was trying to do.
Alas I can't get it to work with my spreadsheet, could it be to do with my layout?
I have used the formula as you typed it only with changes that make it relevant to my sheet.
I've attached a snippet of the sheet if you wouldn't mind having a look?
Aug 16 2018 03:32 PM
Matthew, attached is variant with non-array formula
=IFERROR(INDEX($C$4:$C$21,AGGREGATE(15,6,1/($E$4:$E$21=0)*(ROW($B$4:$B$21)-ROW($B$3)),ROW($B4)-ROW($B$3))),"")
Aug 16 2018 04:27 PM
Thank you so much!
I see where I was going wrong now. I was calling the wrong ROW.