Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
CP CP is offline
external usenet poster
 
Posts: 64
Default If Statement requiring explanation

Hi
I have received much help on this site but I end up copy and pasting the
answers to my questions, I was wondering if someone could explain (break
down) an answer I received earlier so I can actually understand whats
happening?

=IF(ISNA(VLOOKUP(B2,SHEET!A:B,2,0)),,VLOOKUP (B2,SHEET2!A:B,2,0))

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default If Statement requiring explanation


If your vlookup function gives #na() error leave the cell blank else pop up
the output.

Isna function - checks the output Value giving #N/A (value not available)
error value.




"CP" wrote:

Hi
I have received much help on this site but I end up copy and pasting the
answers to my questions, I was wondering if someone could explain (break
down) an answer I received earlier so I can actually understand whats
happening?

=IF(ISNA(VLOOKUP(B2,SHEET!A:B,2,0)),,VLOOKUP (B2,SHEET2!A:B,2,0))

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default If Statement requiring explanation

If the vlookup fails to find a match, it generates an #N/A. So the
ISNA(....) returns TRUE in that case. That causes the IF to return a blank
("") instead of an error. If the vlookup finds a match, the ISNA returns
FALSE, so the IF returns the vlookup result. Net, this runs the vlookup and,
IF the result is #N/A, it changes the result to a blank.

"CP" wrote:

Hi
I have received much help on this site but I end up copy and pasting the
answers to my questions, I was wondering if someone could explain (break
down) an answer I received earlier so I can actually understand whats
happening?

=IF(ISNA(VLOOKUP(B2,SHEET!A:B,2,0)),,VLOOKUP (B2,SHEET2!A:B,2,0))

Many thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default If Statement requiring explanation

run the vlookup formula by itself and see if you get an NA. I also suggest
that you NOT look in the entire column.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"CP" wrote in message
...
Hi
I have received much help on this site but I end up copy and pasting the
answers to my questions, I was wondering if someone could explain (break
down) an answer I received earlier so I can actually understand whats
happening?

=IF(ISNA(VLOOKUP(B2,SHEET!A:B,2,0)),,VLOOKUP (B2,SHEET2!A:B,2,0))

Many thanks


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default If Statement requiring explanation

Sure.

The core formula is:

=VLOOKUP(B2,SHEET!A:B,2,0)

The problem is that if the value in B2 does not appear in column A, an error
message will appear. If IF statements says that if VLOOKUP() displays an
error, display a blank cell. If VLOOKUP() does not display an error, display
what VLOOKUP() returns.
--
Gary''s Student - gsnu200832


"CP" wrote:

Hi
I have received much help on this site but I end up copy and pasting the
answers to my questions, I was wondering if someone could explain (break
down) an answer I received earlier so I can actually understand whats
happening?

=IF(ISNA(VLOOKUP(B2,SHEET!A:B,2,0)),,VLOOKUP (B2,SHEET2!A:B,2,0))

Many thanks



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
XIRR Requiring Sale Price 0 Will[_3_] Excel Discussion (Misc queries) 2 November 3rd 08 11:28 PM
Sum Problem requiring help NoodNutt Excel Worksheet Functions 6 May 2nd 08 05:23 PM
Requiring data in certain cells jerminski73 Excel Worksheet Functions 2 November 21st 07 02:03 PM
requiring a field cherrynich Excel Worksheet Functions 1 July 10th 06 10:00 PM
Formula requiring two different criterias MJMP Excel Worksheet Functions 8 March 1st 05 10:13 PM


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