Thread: IF & VLOOKUP
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default IF & VLOOKUP

You need to have the formula in worksheet B to "pull" data from
worksheet A, and you also want to match on both the date AND the
account number. In worksheet A, insert a new column C and in C2 enter
this formula:

=A2&B2

This joins the two columns together to form a unique key. Copy this
formula down column C for as many data items as you have (assume this
is 500).

Then in column C of worksheet B enter this formula in C2:

=VLOOKUP(A2&B2,'worksheet A'!C$2:D$500,2,0)

and copy this formula down column C for as many items as you have in
columns A and B.

Hope this helps.

Pete

Dr Phibes wrote:
Hi,

I am a total beginner in Excel, VLOOKUPS etc.

I want to do the following but I am not too sure of the syntax. Help would
be greatly appreciated.

I have 2 workbooks.

In workbook A I have a date, an account number and some information

in workbook B I have a date, an account number and the need to take
information from workbook A and insert it into workbook B

I have also got the following but it's not working..This is in Workbook A

=IF((C8<'WORKBOOK B'!A2),VLOOKUP(D8,'WORKBOOK B'!$A:$D,2,FALSE))

Basically, I need the dates to match in order to look up the account number
with the V lookup and give me the data next to the account number.

Where am I going wrong?

Many thanks!