checking postcode is on a list formula

%3CLINGO-SUB%20id%3D%22lingo-sub-1618925%22%20slang%3D%22en-US%22%3Echecking%20postcode%20is%20on%20a%20list%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1618925%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20get%20a%20formula%20that%20will%20check%20an%20entry%20in%20column%20E%20is%20on%20a%20list%20and%20answer%20yes%20or%20no.%3C%2FP%3E%3CP%3EThis%20is%20a%20form%20where%20a%20postcode%20will%20be%20entered%20and%20if%20it%20is%20on%20a%20list%20of%203190%20entries%20held%20on%20%22Data1%22%20sheet%20will%20enter%20yes%20into%20this%20cell.%20Can%20you%20help%3F%20I%20am%20pretty%20new%20to%20formulas%20an%20struggling.%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1618925%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1618991%22%20slang%3D%22en-US%22%3ERe%3A%20checking%20postcode%20is%20on%20a%20list%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1618991%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774670%22%20target%3D%22_blank%22%3E%40Jolange%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20use%20this%20formula...%3C%2FP%3E%3CP%3E%3DNOT(ISERROR(MATCH(A1%2CSheet2!A%3AA%2C0)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Bennadeau_0-1598625509917.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F215243i27CE42297D61B440%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Bennadeau_0-1598625509917.png%22%20alt%3D%22Bennadeau_0-1598625509917.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIn%20this%20example%2C%20I%20added%20entries%20A%20to%20H%20in%20sheet2%20column%20A.%20Then%2C%20(what%20you%20see%20in%20the%20screen%20shot)%20in%20sheet1%20if%20the%20value%20of%20cell%20A1%20is%20found%20in%20Sheet2%20column%20A%2C%20cell%20B1%20returns%20%22true%22.%20otherwise%2C%20it%20returns%20%22false%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1620558%22%20slang%3D%22en-US%22%3ERe%3A%20checking%20postcode%20is%20on%20a%20list%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1620558%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774670%22%20target%3D%22_blank%22%3E%40Jolange%3C%2FA%3E%26nbsp%3BAs%20a%20variant%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DISNUMBER(MATCH(A1%2CData1!A%3AA%2C0))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1624493%22%20slang%3D%22en-US%22%3ERe%3A%20checking%20postcode%20is%20on%20a%20list%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1624493%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3BThank%20you%2C%26nbsp%3B%20got%20this%20one%20to%20work%20but%20now%20i%20am%20getting%20all%20false%20results%20even%20when%20i%20type%20the%20top%20item%20from%20the%20list%2C%20any%20ideas%20how%20to%20get%20true%3F%20I%20have%20even%20copied%20and%20pasted%20from%20the%20list%20to%20get%20it%20exact%20but%20still%20get%20false.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1624498%22%20slang%3D%22en-US%22%3ERe%3A%20checking%20postcode%20is%20on%20a%20list%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1624498%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F703724%22%20target%3D%22_blank%22%3E%40Bennadeau%3C%2FA%3E%26nbsp%3BThank%20you%20this%20is%20great%20but%20now%20i%20can%20only%20get%20a%20false%20result%20not%20a%20true%20even%20if%20i%20copy%20and%20paste%20somthing%20from%20the%20list%2C%20any%20suggestions%20please%3F%20Formula%20as%20i%20have%20it%20is%3C%2FP%3E%3CP%3E%3DISNUMBER(MATCH(F2Sheet2!BI2%3ASheet2!D3190%2C0))%3C%2FP%3E%3CP%3EI%20was%20using%20YO126EY%20as%20a%20test%20and%20this%20is%20exactly%20how%20it%20is%20in%20the%20list%20i%20was%20given.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1624581%22%20slang%3D%22en-US%22%3ERe%3A%20checking%20postcode%20is%20on%20a%20list%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1624581%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774670%22%20target%3D%22_blank%22%3E%40Jolange%3C%2FA%3E%26nbsp%3BCan't%20tell%20without%20seeing.%20I%20suspect%20that%20you%20are%20not%20finding%20exact%20matches%20due%20to%20trailing%20or%20leading%20spaces.%20What%20if%20you%20copy%20the%20first%20item%20of%20the%20list%20to%20the%20cell%20that%20should%20be%20matched%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1625955%22%20slang%3D%22en-US%22%3ERe%3A%20checking%20postcode%20is%20on%20a%20list%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1625955%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774670%22%20target%3D%22_blank%22%3E%40Jolange%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20formula%3A%26nbsp%3B%3CSPAN%3E%3DISNUMBER(MATCH(F2Sheet2!BI2%3ASheet2!D3190%2C0))%20will%20return%20false%20if%20the%20result%20is%20not%20a%20number.%20In%20your%20case%2C%20all%20your%20postal%20codes%20(I%20assume)%20have%20at%20least%201%20letter.%20This%20won't%20work%20for%20you.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ETry%20my%20original%20formula%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3DNOT(ISERROR(MATCH(F2%2CSheet2!A%3AA%2C0)))%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eand%20ensure%20all%20your%20postal%20codes%20are%20listed%20in%20a%20single%20column%20A%20of%20sheet%202.%20If%20they%20are%20in%20a%20different%20column%2C%20change%20%22A%3AA%22%20in%20the%20formula%20to%20match%20the%20column%20you're%20using.%20(e.g.%20B%3AB%20or%20C%3AC%20...)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I am trying to get a formula that will check an entry in column E is on a list and answer yes or no.

This is a form where a postcode will be entered and if it is on a list of 3190 entries held on "Data1" sheet will enter yes into this cell. Can you help? I am pretty new to formulas an struggling. Thanks.

6 Replies
Highlighted

Hi @Jolange,

 

You can use this formula...

=NOT(ISERROR(MATCH(A1,Sheet2!A:A,0)))

 

Bennadeau_0-1598625509917.png

In this example, I added entries A to H in sheet2 column A. Then, (what you see in the screen shot) in sheet1 if the value of cell A1 is found in Sheet2 column A, cell B1 returns "true". otherwise, it returns "false".

Highlighted

@Jolange As a variant:

=ISNUMBER(MATCH(A1,Data1!A:A,0))

 

Highlighted

Hi

@Riny_van_Eekelen Thank you,  got this one to work but now i am getting all false results even when i type the top item from the list, any ideas how to get true? I have even copied and pasted from the list to get it exact but still get false.

Highlighted

@Bennadeau Thank you this is great but now i can only get a false result not a true even if i copy and paste somthing from the list, any suggestions please? Formula as i have it is

=ISNUMBER(MATCH(F2Sheet2!BI2:Sheet2!D3190,0))

I was using YO126EY as a test and this is exactly how it is in the list i was given.

Highlighted

@Jolange Can't tell without seeing. I suspect that you are not finding exact matches due to trailing or leading spaces. What if you copy the first item of the list to the cell that should be matched?

 

 

Highlighted

Hi @Jolange,

 

This formula: =ISNUMBER(MATCH(F2Sheet2!BI2:Sheet2!D3190,0)) will return false if the result is not a number. In your case, all your postal codes (I assume) have at least 1 letter. This won't work for you.

 

Try my original formula 

=NOT(ISERROR(MATCH(F2,Sheet2!A:A,0)))

and ensure all your postal codes are listed in a single column A of sheet 2. If they are in a different column, change "A:A" in the formula to match the column you're using. (e.g. B:B or C:C ...)