Combine Vlookup and If?
Hi Vicky
The below formula in Sheet1 will lookup the customer in Sheet1 Row 2 with
the customer in Sheet2 and check whether the amounts are matching
=IF(VLOOKUP(A2,Sheet2!A:B,2,0)=B2,"Amounts are same","DifferentAmounts")
If you want to handle missing customer in Sheet2; try the below enhanced
formula which uses ISNA()
=IF(ISNA(VLOOKUP(A4,Sheet2!A:B,2,0)),"Customer not
found",IF(VLOOKUP(A4,Sheet2!A:B,2,0)=B4,"Amounts are same","Different
Amounts"))
If this post helps click Yes
---------------
Jacob Skaria
"Vicky" wrote:
I have 2 lists, in one list I have a customer num, invoice amt, and some
other data (In columns A, B, C, etc). On other sheet I have a second list
which also contains customer num, Invoice amt, other data. This information
is not always the same on both sheets. I need a formula that will find a
customer from sheet 1, look up the customer num on sheet 2, then compare
their Invoice Amounts.
What I did was to create a vlookup to compare the companies, which returned
the invoice amount, in the next column I added an =IF(B2=C2),"same",
different"
Is there an easier way?
Suggestions?
|