mardi 19 janvier 2021

Excel, if cell value = 0 skip (dependent on 2 columns)

so im trying to create an excel command that skips if the cell has a 0 value in it and produce a table with only the values greater than 0 along with their name

I currently am using an if error index command however struggling to figure out how to get it to work based off of another result I have added 2 tables that show what i am looking to achieve below

My code for the numbers is this: *Updated code Im trying but keep getting issues when I try to do it from different sheets

=IFERROR(INDEX(Table1[[#Headers],[Name]], SMALL(IF((Table1[[#Headers],[Number]])=0,"",ROW(Table1[[#Headers],[Name]])-MIN(ROW(Table1[[#Headers],[Name]]))+1,ROW(Sheet1!B2))),"")

^Tells me im trying to run too many functions but its just the same as the one below?

This code works when its not across sheets:

=IFERROR(INDEX($A$1:$A$71, SMALL(IF(($B$1:$B$71)=0, "", ROW($A$1:$A$71)-MIN(ROW($A$1:$A$71))+1), ROW(A2))),"")

However this doesnt work for the names as there is always a name there... am i trying to overcomplicate this ?

any help would be great, thanks

Start Table:

Name Number
Mark 0
George 7
Amish 5
Lavell 0
John 0
Mike 3

End table:

Name Number
George 7
Amish 5
Mike 3

Aucun commentaire:

Enregistrer un commentaire