SOLVED

IF formula

Copper 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 (Copper 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!

1 best response

Accepted Solutions
best response confirmed by thijsvro (Copper 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)

 

View solution in original post