#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default nested if

This vlookup works for the sheet its on, but if it doesn't find it I want it
to check the weekending for the 2 previous sheets respectively.

=VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE)
What I want to know is will this work to nest the if's.
if(=VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE),=VLOOKUP(B46,'07-10-07'!B45:I112,8,FALSE),=VLOOKUP(B46,'07-3-07'!B45:I112,8,FALSE))

tia,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default nested if

You really need a construct like this:

=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)

So, your formula would be:

=IF(ISNA(VLOOKUP(B46,'07-17-07'!
B45:I112,8,0)),IF(ISNA(VLOOKUP(B46,'07-10-07'!B45:I1*
12,8,0)),IF(ISNA(VLOOKUP(B46,'07-3-07'!B45:I112,8,0)),"not
present",VLOOKUP(B46,'07-3-07'!B45:I112,8,0)),VLOOKUP(B46,'07-10-07'!
B45:I1*12,8,0)),VLOOKUP(B46,'07-17-07'!B45:I112,8,0))

I've replaced FALSE with 0 to make it a bit shorter, but this is all
one formula so be wary of spurious linebreaks if copy/pasting from the
newsgroups.

Hope this helps.

Pete

On Jul 27, 11:26 pm, Janis wrote:
This vlookup works for the sheet its on, but if it doesn't find it I want it
to check the weekending for the 2 previous sheets respectively.

=VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE)
What I want to know is will this work to nest the if's.
if(=VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE),=VLOOKUP(B46,'07-10-07'!B45:I1*12,8,FALSE),=VLOOKUP(B46,'07-3-07'!B45:I112,8,FALSE))

tia,



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 733
Default nested if

Janis wrote...
This vlookup works for the sheet its on, but if it doesn't find it I
want it to check the weekending for the 2 previous sheets respectively.

....
What I want to know is will this work to nest the if's.

if(=VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE),
=VLOOKUP(B46,'07-10-07'!B45:I112,8,FALSE),
=VLOOKUP(B46,'07-3-07'!B45:I112,8,FALSE))


You'd need something like

=IF(1-ISNA(VLOOKUP(B46,'07-17-07'!B45:I112,8,0)),
VLOOKUP(B46,'07-17-07'!B45:I112,8,0),
IF(1-ISNA(VLOOKUP(B46,'07-10-07'!B45:I112,8,0)),
VLOOKUP(B46,'07-10-07'!B45:I112,8,0),
IF(1-ISNA(VLOOKUP(B46,'07-3-07'!B45:I112,8,0)),
VLOOKUP(B46,'07-3-07'!B45:I112,8,0),"")))

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default nested if

One way:

=IF(ISNA(MATCH(B46,'07-17-07'!B45:B112, FALSE)),
IF(ISNA(MATCH(B46,'07-10-07'!B45:B112, FALSE)),
VLOOKUP(B46,'07-03-07'!B45:I112, 8, FALSE),
VLOOKUP(B46,'07-10-07'!B45:I112, 8, FALSE)),
VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE))

In article ,
Janis wrote:

This vlookup works for the sheet its on, but if it doesn't find it I want it
to check the weekending for the 2 previous sheets respectively.

=VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE)
What I want to know is will this work to nest the if's.
if(=VLOOKUP(B46,'07-17-07'!B45:I112,8,FALSE),=VLOOKUP(B46,'07-10-07'!B45:I112,
8,FALSE),=VLOOKUP(B46,'07-3-07'!B45:I112,8,FALSE))

tia,

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 based on nested if in seperate sheet. how? scouserabbit Excel Worksheet Functions 5 March 2nd 07 04:03 PM
Nested IF Secret Squirrel Excel Discussion (Misc queries) 2 December 1st 06 12:02 PM
Nested IF Ed Ferrero Excel Discussion (Misc queries) 4 November 27th 05 05:31 PM
Nested if bjd via OfficeKB.com Excel Worksheet Functions 4 June 21st 05 03:25 PM
Need HELP with NESTED IF Bob Phillips Excel Discussion (Misc queries) 0 November 28th 04 01:51 PM


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