SOLVED

New Contributor

# IF formula

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

# Re: IF formula

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

# Re: IF formula

@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

In Dutch the first one would be:

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

# Re: IF formula

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

Also thanks for putting it in Dutch!