I am working on a sheet with the following:
Sheet 1 Col A = Description
Sheet 1 Col B = ID
Sheet 1 Col C = Returned value from Sheet 2 Col B when value in Sheet 1
Col B matches value in Sheet 2 Col A
I would like to take a cell from Sheet 1 Col B and find the matching
value in Sheet 2 Col A and fill in Sheet 1 Col C with associated value
from Sheet 2 Col B.
I know this is a simple lookup but I can't get it to work.--
DebP
------------------------------------------------------------------------
DebP's Profile: www.excelforum.com/member.php...oamp;userid=32273
View this thread: www.excelforum.com/showthread...hreadid=520262Hi!
Try this:
=IF(COUNTIF(B1,Sheet2!A:A),VLOOKUP(B1,Sheet2!A:B,2 ,0),quot;quot;)
Biff
quot;DebPquot; gt; wrote in message
news
gt;
gt; I am working on a sheet with the following:
gt;
gt; Sheet 1 Col A = Description
gt; Sheet 1 Col B = ID
gt; Sheet 1 Col C = Returned value from Sheet 2 Col B when value in Sheet 1
gt; Col B matches value in Sheet 2 Col A
gt;
gt; I would like to take a cell from Sheet 1 Col B and find the matching
gt; value in Sheet 2 Col A and fill in Sheet 1 Col C with associated value
gt; from Sheet 2 Col B.
gt;
gt; I know this is a simple lookup but I can't get it to work.
gt;
gt;
gt; --
gt; DebP
gt; ------------------------------------------------------------------------
gt; DebP's Profile:
gt; www.excelforum.com/member.php...oamp;userid=32273
gt; View this thread: www.excelforum.com/showthread...hreadid=520262
gt;
Thanks for the help, but I tried your suggestion and nothing happened.--
DebP
------------------------------------------------------------------------
DebP's Profile: www.excelforum.com/member.php...oamp;userid=32273
View this thread: www.excelforum.com/showthread...hreadid=520262gt;Thanks for the help, but I tried your suggestion and nothing happened.
Ok, let's examine what that means!
gt;=IF(COUNTIF(B1,Sheet2!A:A),VLOOKUP(B1,Sheet2!A:B, 2,0),quot;quot;)
I take it that quot;nothing happenedquot; means the formula returned a blank which
is what the quot;quot; is for.
So, if the formula returned a blank that means this portion:
COUNTIF(B1,Sheet2!A:A)
evaluated to zero which means that there is no match of B1 on Sheet2 in
column A.
If you can see for quot;certainquot; that there is in fact a match try this:
Find the matching cell on Sheet2 of column A. Assume that cell is A40.
Enter this formula in some empty cell:
=Sheet1!B1=Sheet2!A40
If they are in fact matches that formula will return TRUE and the lookup
formula should have returned the appropriate corresponding value. If the
formula returns FALSE then they are not matches. They may look the same but
can still not be matches. One value may have leading or trailing spaces that
you can't see. One value may be a TEXT number and the other may be a NUMERIC
number.
Biff
quot;DebPquot; gt; wrote in message
news
gt;
gt; Thanks for the help, but I tried your suggestion and nothing happened.
gt;
gt;
gt; --
gt; DebP
gt; ------------------------------------------------------------------------
gt; DebP's Profile:
gt; www.excelforum.com/member.php...oamp;userid=32273
gt; View this thread: www.excelforum.com/showthread...hreadid=520262
gt;
Ooops!
I committed a major blunder! I'm downright embarrassed!
=IF(COUNTIF(B1,Sheet2!A:A),VLOOKUP(B1,Sheet2!A:B,2 ,0),quot;quot;)
I have the arguments backwards in the Countif function!!!!!!! lt;ouchgt;
Should be:
=IF(COUNTIF(Sheet2!A:A,B1),VLOOKUP(B1,Sheet2!A:B,2 ,0),quot;quot;)
Biff
quot;Biffquot; gt; wrote in message
...
gt; gt;Thanks for the help, but I tried your suggestion and nothing happened.
gt;
gt; Ok, let's examine what that means!
gt;
gt;gt;=IF(COUNTIF(B1,Sheet2!A:A),VLOOKUP(B1,Sheet2!A:B ,2,0),quot;quot;)
gt;
gt; I take it that quot;nothing happenedquot; means the formula returned a blank which
gt; is what the quot;quot; is for.
gt;
gt; So, if the formula returned a blank that means this portion:
gt;
gt; COUNTIF(B1,Sheet2!A:A)
gt;
gt; evaluated to zero which means that there is no match of B1 on Sheet2 in
gt; column A.
gt;
gt; If you can see for quot;certainquot; that there is in fact a match try this:
gt;
gt; Find the matching cell on Sheet2 of column A. Assume that cell is A40.
gt;
gt; Enter this formula in some empty cell:
gt;
gt; =Sheet1!B1=Sheet2!A40
gt;
gt; If they are in fact matches that formula will return TRUE and the lookup
gt; formula should have returned the appropriate corresponding value. If the
gt; formula returns FALSE then they are not matches. They may look the same
gt; but can still not be matches. One value may have leading or trailing
gt; spaces that you can't see. One value may be a TEXT number and the other
gt; may be a NUMERIC number.
gt;
gt; Biff
gt;
gt; quot;DebPquot; gt; wrote in
gt; message news
gt;gt;
gt;gt; Thanks for the help, but I tried your suggestion and nothing happened.
gt;gt;
gt;gt;
gt;gt; --
gt;gt; DebP
gt;gt; ------------------------------------------------------------------------
gt;gt; DebP's Profile:
gt;gt; www.excelforum.com/member.php...oamp;userid=32273
gt;gt; View this thread:
gt;gt; www.excelforum.com/showthread...hreadid=520262
gt;gt;
gt;
gt;
- May 27 Tue 2008 20:44
Return value
close
全站熱搜
留言列表
發表留言
留言列表

