Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default If, Lookup, Match or a combination of all

Hi

I have 1 excel spreadsheet with several worksheets. What I need to do is to
take the value from 1 cell in one sheet look at a list of values on a second
sheet and return the value but only if there is an exact match else I need it
to return a 0. At the moment with Lookup it is returning a value that is the
closest match.

Sheet 1
Column A Column B Column C Column D Column J
sumtotal name title Code Value of Col B
from sheet 2

Sheet 2
Column A Column B
Code Value

I need it to look the value from column D in Sheet 1 and match it to the
Code in Column A on sheet 2 and return the value of Column B to Col J in
sheet 1 else return a 0

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default If, Lookup, Match or a combination of all

On Tue, 22 Jul 2008 03:14:38 -0700, Beverly Darvill
wrote:

Hi

I have 1 excel spreadsheet with several worksheets. What I need to do is to
take the value from 1 cell in one sheet look at a list of values on a second
sheet and return the value but only if there is an exact match else I need it
to return a 0. At the moment with Lookup it is returning a value that is the
closest match.

Sheet 1
Column A Column B Column C Column D Column J
sumtotal name title Code Value of Col B
from sheet 2

Sheet 2
Column A Column B
Code Value

I need it to look the value from column D in Sheet 1 and match it to the
Code in Column A on sheet 2 and return the value of Column B to Col J in
sheet 1 else return a 0

Thanks



Try the following formula in Sheet1 cell J2:

=IF(ISERROR(VLOOKUP(D2,Sheet2!$A$1:$B$100,2,FALSE) ),0,VLOOKUP(D2,Sheet2!$A$1:$B$100))

The 100 might have to be increased if you have more than 100 rows of
data in Sheet2

Hope this helps / Lars-Åke


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default If, Lookup, Match or a combination of all

=IF(NOT(ISNA(VLOOKUP(value,Sheet2!Lookup_Table,2,F ALSE))),VLOOKUP(value,Sheet2!Lookup_Table,2,FALSE) ,"")

--
__________________________________
HTH

Bob

"Beverly Darvill" wrote in message
...
Hi

I have 1 excel spreadsheet with several worksheets. What I need to do is
to
take the value from 1 cell in one sheet look at a list of values on a
second
sheet and return the value but only if there is an exact match else I need
it
to return a 0. At the moment with Lookup it is returning a value that is
the
closest match.

Sheet 1
Column A Column B Column C Column D Column J
sumtotal name title Code Value of Col B
from sheet 2

Sheet 2
Column A Column B
Code Value

I need it to look the value from column D in Sheet 1 and match it to the
Code in Column A on sheet 2 and return the value of Column B to Col J in
sheet 1 else return a 0

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default If, Lookup, Match or a combination of all

On Tue, 22 Jul 2008 10:24:52 GMT, Lars-Åke Aspelin
wrote:

On Tue, 22 Jul 2008 03:14:38 -0700, Beverly Darvill
wrote:

Hi

I have 1 excel spreadsheet with several worksheets. What I need to do is to
take the value from 1 cell in one sheet look at a list of values on a second
sheet and return the value but only if there is an exact match else I need it
to return a 0. At the moment with Lookup it is returning a value that is the
closest match.

Sheet 1
Column A Column B Column C Column D Column J
sumtotal name title Code Value of Col B
from sheet 2

Sheet 2
Column A Column B
Code Value

I need it to look the value from column D in Sheet 1 and match it to the
Code in Column A on sheet 2 and return the value of Column B to Col J in
sheet 1 else return a 0

Thanks



Try the following formula in Sheet1 cell J2:

=IF(ISERROR(VLOOKUP(D2,Sheet2!$A$1:$B$100,2,FALSE )),0,VLOOKUP(D2,Sheet2!$A$1:$B$100))

The 100 might have to be increased if you have more than 100 rows of
data in Sheet2

Hope this helps / Lars-Åke


I forgot to explain that it is the FALSE that tells VLOOKUP to look
for an exact value.
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
Combination...SumProduct, Index, Match? Monte Excel Worksheet Functions 4 July 16th 08 08:07 AM
Lookup valid combination of multiple cells Gerard Excel Worksheet Functions 5 November 9th 07 10:32 AM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM
Lookup or Match ? carl Excel Worksheet Functions 4 July 12th 05 07:22 PM
combination of vlookup and match question Nelson Excel Worksheet Functions 3 June 24th 05 08:18 AM


All times are GMT +1. The time now is 10:54 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"