Compare and Return Value

G

Guest

I'm trying to compare account numbers from two worksheets on a monthly basis,
and then return a value for a second account number in the second worksheet.
The account numbers vary each month. Thank you.
 
G

Guest

Use the vlookup function, if you provide more information or an example it
will be easier to give you detail on how to set it up or if you prefer read
the vlookup function related help .
 
G

Guest

Thank you - very new here. For example, Column A on Worksheet 1 holds all
account numbers, Column B on same wksht holds 2nd account number (for
accounting purposes and moving journal monies). Worksheet 2 would be a
subsequent month where I want to compare that month's account numbers to
previous month, find any matches, and then fill in the 2nd account number for
any specific matches.

Ex:

Worksheet 1 Month 1 Worksheet 2 Month 2
Col A Col B Col A Col B
Acct # Journal Acct# Acct # Journal Acct#
12345 67890 34872 28730
34872 28730 89732 no match
38458 91087 12345 67890
 
G

Guest

Place this formula in your worksheet 2:
=IF(ISERROR(VLOOKUP(A1,Sheet1!$A$1:$B$3,2,FALSE)),"No
Match",VLOOKUP(A1,Sheet1!$A$1:$B$3,2,FALSE))

Note that I am using the defaul Sheet names, Sheet1 and Sheet2, also I
placed your data in Columns A and B rows 1 through 3 on both worksheets. The
$ signs ensures that when you copy the formula from one cell to the next you
get a constant table array. Modify as necessary, but your data should look
something like what you originally had except for the formula above where you
Worksheet 1 Month 1 Worksheet 2 Month 2
Col A Col B Col A Col B
Acct # Journal Acct# Acct # Journal Acct#
12345 67890 34872 Formula
34872 28730 89732 Formula
38458 91087 12345 Formula


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.
 
G

Guest

That worked great - thank you Michael!

Michael said:
Place this formula in your worksheet 2:
=IF(ISERROR(VLOOKUP(A1,Sheet1!$A$1:$B$3,2,FALSE)),"No
Match",VLOOKUP(A1,Sheet1!$A$1:$B$3,2,FALSE))

Note that I am using the defaul Sheet names, Sheet1 and Sheet2, also I
placed your data in Columns A and B rows 1 through 3 on both worksheets. The
$ signs ensures that when you copy the formula from one cell to the next you
get a constant table array. Modify as necessary, but your data should look
something like what you originally had except for the formula above where you


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.
 

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