Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Combine Vlookup and If?

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default 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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup combine indirect [email protected] Excel Worksheet Functions 1 November 21st 07 07:12 PM
combine Vlookup with the Right function Harold Good Excel Worksheet Functions 3 May 4th 07 04:10 PM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Possible to combine VLOOKUP and IF(AND) functions? Ihoris Excel Worksheet Functions 1 April 6th 06 09:54 AM
How do I combine If and VLookup function? Felicia Pickett Excel Worksheet Functions 2 December 14th 05 12:06 AM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"