SOLVED

IF formula

%3CLINGO-SUB%20id%3D%22lingo-sub-2148526%22%20slang%3D%22en-US%22%3EIF%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2148526%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20having%20a%20problem%20with%20the%20IF%20formula.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20result%20I%20want%20is%3A%3C%2FP%3E%3CP%3EIf%20%22x%22%20is%20in%20colomn%20A%20on%20tab%201%20and%20tab%202%20then%20it%20needs%20to%20pick%20the%20data%20linked%20to%20the%20%22x%22%20in%20colomn%20B%20in%20tab%202.%3C%2FP%3E%3CP%3EIts%20in%20two%20different%20tabs%20so%20it's%20kind%20of%20difficult%20to%20keep%20a%20clear%20overview.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20the%20%3DIf(countif(A1%3AA15000%3BX)%26gt%3B0%3BB1%3AB15000)%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20when%20I%20use%20this%20one%2C%20it%20doesn't%20choose%20the%20one%20corresponding%20to%20the%20%22x%22.%20It%20doesn't%20pick%20the%20one%20linked%20to%20the%20%22x%22.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20to%20sum%20it%20all%20up%2C%20if%20%22x%22%20is%20in%20column%20A%20on%20the%20first%20tab%2C%20and%20the%20%22x%22%20is%20on%20column%20A%20on%20the%20second%20tab%2C%20it%20needs%20to%20pick%20the%20data%20from%20column%20B%20on%20the%20second%20tab%2C%20which%20is%20linked%20to%20the%20%22x%22%20on%20both%20tabs.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20you%20understand%20what%20I%20mean%20with%20this%20crappy%20explanation.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2148526%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-2148656%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2148656%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F971900%22%20target%3D%22_blank%22%3E%40thijsvro%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20attached%20a%20picture%20so%20that%20I%20can%20explain%20a%20little%20better.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20in%20this%20picture%2C%20if%20in%20column%20D%20the%20cel%20D2%20is%20in%20column%20A%2C%20it%20needs%20to%20pick%20the%20cel%20next%20to%20the%20cel%20that%20is%20picked.%20For%20example%3B%20D2%20%3D%20P21.042596%20is%20in%20column%20A%2C%20it%20picks%20the%20data%20in%20the%20column%20B%20next%20to%20it.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2148922%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2148922%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F971900%22%20target%3D%22_blank%22%3E%40thijsvro%3C%2FA%3E%26nbsp%3BYou%20need%20to%20look%20into%20using%20VLOOKUP%20or%20XLOOKUP%20(if%20you%20Excel%20version%20supports%20it).%3C%2FP%3E%3CP%3ESomething%20like%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DVLOOKUP(D2%2CA%3AB%2C2%2C0)%0A%0Aor%0A%0A%3DXLOOKUP(D2%2CA%3AA%2CB%3AB%2C%22Not%20found%22%2C0%2C1)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BIn%20Dutch%20the%20first%20one%20would%20be%3A%3C%2FP%3E%3CP%3E%3DVERT.ZOEKEN(D2%3BA%3AB%3B2%3B0)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi everyone,

 

I'm having a problem with the IF formula. 

 

The result I want is:

If "x" is in colomn A on tab 1 and tab 2 then it needs to pick the data linked to the "x" in colomn B in tab 2.

Its in two different tabs so it's kind of difficult to keep a clear overview.

 

I tried the =If(countif(A1:A15000;X)>0;B1:B15000) 

 

But when I use this one, it doesn't choose the one corresponding to the "x". It doesn't pick the one linked to the "x". 

 

So to sum it all up, if "x" is in column A on the first tab, and the "x" is on column A on the second tab, it needs to pick the data from column B on the second tab, which is linked to the "x" on both tabs. 

 

I hope you understand what I mean with this crappy explanation. 

 

 

3 Replies

@thijsvro 

I attached a picture so that I can explain a little better.

 

So in this picture, if in column D the cel D2 is in column A, it needs to pick the cel next to the cel that is picked. For example; D2 = P21.042596 is in column A, it picks the data in the column B next to it. 

best response confirmed by thijsvro (New Contributor)
Solution

@thijsvro You need to look into using VLOOKUP or XLOOKUP (if you Excel version supports it).

Something like:

=VLOOKUP(D2,A:B,2,0)

or

=XLOOKUP(D2,A:A,B:B,"Not found",0,1)

 In Dutch the first one would be:

=VERT.ZOEKEN(D2;A:B;2;0)

 

@Riny_van_Eekelen 

Thank you very much! It worked just like I wanted.

 

Also thanks for putting it in Dutch!