Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JBS JBS is offline
external usenet poster
 
Posts: 11
Default Nested if statements

I want to do the following

vlookup values from worksheet a in worksheet b and return results to cell 1
if no result from vlookup then lookup value from worksheet a in worksheet c
and return value to cell 1

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Nested if statements

=IF(ISERROR(VLOOKUP('Sheet a'!A2,'Sheet b'!A2:D100,2,FALSE)),VLOOKUP('Sheet
a'!A2,'Sheet c'!A2:D100,2,FALSE),('Sheet a'!A2,'Sheet b'!A2:D100,2,FALSE))

Note that as you'll need to adjust ranges and column callout in the VLOOKUPs
as necessary.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"JBS" wrote:

I want to do the following

vlookup values from worksheet a in worksheet b and return results to cell 1
if no result from vlookup then lookup value from worksheet a in worksheet c
and return value to cell 1

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Nested if statements

Assuming the lookup value is on one sheet or the other:

A1 = lookup value

=VLOOKUP(A1,IF(COUNTIF(Sheet2!A1:A5,A1),Sheet2!A1: B5,Sheet3!A1:B5),2,0)

--
Biff
Microsoft Excel MVP


"Luke M" wrote in message
...
=IF(ISERROR(VLOOKUP('Sheet a'!A2,'Sheet
b'!A2:D100,2,FALSE)),VLOOKUP('Sheet
a'!A2,'Sheet c'!A2:D100,2,FALSE),('Sheet a'!A2,'Sheet b'!A2:D100,2,FALSE))

Note that as you'll need to adjust ranges and column callout in the
VLOOKUPs
as necessary.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"JBS" wrote:

I want to do the following

vlookup values from worksheet a in worksheet b and return results to cell
1
if no result from vlookup then lookup value from worksheet a in worksheet
c
and return value to cell 1



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
Nested if statements JICDB Excel Worksheet Functions 2 November 20th 07 06:48 PM
Nested If statements [email protected] Excel Worksheet Functions 3 September 21st 06 10:13 PM
Nested IF statements maacmaac Excel Discussion (Misc queries) 2 January 23rd 06 10:18 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
Do I need nested IF statements? Jaramya Excel Worksheet Functions 1 November 5th 04 09:10 PM


All times are GMT +1. The time now is 07:01 PM.

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

About Us

"It's about Microsoft Excel"