vlookup or Match

R

Rob

I have two worksheets with the following Data in each column

Sheet 1
A B C D
1 1000 14/08/2008 10:20 15/09/2008 13:45
2 1002 19/08/2008 21:00 17/09/2008 23:55
3 1003 22/08/2008 06:55 22/09/2008 19:35
4 1006 29/08/2008 02:20 25/09/2008 05:15

Sheet 2
A B C D
152 1001 12/08/2008 00:25 10/09/2008 18:35
153 1000 18/08/2008 10:20 15/09/2008 13:45
154 1002 24/08/2008 21:00 17/09/2008 23:55
155 1003 28/08/2008 06:55 22/09/2008 19:35

In column E on Sheet 2 I would like to see the date from Column C on Sheet 1
where the number in Column B Sheet 2 matches the number in Column B Sheet 1
and where their is no match then return "blank"
 
E

Eduardo

Hi,

=SUMPRODUCT(--(G2=sheet1!B1:B1000),sheet1!C1:C1000)

change range to fit your needs but remember both sides of the formula need
the same range

Format column E with the same format used in column C

if you are using excel 2007

=SUMPRODUCT(--(G2=sheet1!B:B),sheet1!C:C)

if this helps please click yes thanks
 
P

Pete_UK

Try this in E1 of Sheet2:

=IF(ISNA(MATCH(B1,Sheet1!B:B,0)),"",VLOOKUP(B1:Sheet1!B:C,2,0))

Format the cell as dd/mm/yyyy if you only want to see the date, then
copy down.

Hope this helps.

Pete
 
P

Pete_UK

Sorry, a typo in there - should be:

=IF(ISNA(MATCH(B1,Sheet1!B:B,0)),"",VLOOKUP(B1,Sheet1!B:C,2,0))

Pete
 
E

Eduardo

Opps I misread your post use this

=IF(ISNA(MATCH(c2,Sheet1!B1:B1000,0)),"",SUMPRODUCT(--(C2=sheet1!B1:B1000),sheet1!C1:C1000))

if you are using excel 2007

=IF(ISNA(MATCH(c2,Sheet1!B:B,0)),"",SUMPRODUCT(--(C2=sheet1!B:B),sheet1!C:C))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top