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

Hi,
I have been successfully using the following statement:

=IF(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),"",VLOOKUP(A17,'Data Base'!$A$1:$Y$413,14,FALSE))

I want to add another if to this, so that I get:
If lookup results in error message, leave blank (first part above)
If lookup results in the value 0, leave blank (how do I add this?)
Otherwise, put result of lookup (second part above)

How do I had the the second IF to this equation so that if the lookup
results in the value 0, leave blank?
--
Julie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default if statements

There might be a shorter solution out there but this should work

=IF(OR(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A17,'Dat a
Base'!$A$1:$Y$413,14,FALSE))

"Julie" wrote:

Hi,
I have been successfully using the following statement:

=IF(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),"",VLOOKUP(A17,'Data Base'!$A$1:$Y$413,14,FALSE))

I want to add another if to this, so that I get:
If lookup results in error message, leave blank (first part above)
If lookup results in the value 0, leave blank (how do I add this?)
Otherwise, put result of lookup (second part above)

How do I had the the second IF to this equation so that if the lookup
results in the value 0, leave blank?
--
Julie

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

I must be doing something wrong - I tried your equation and while it did
succeed in putting blanks where the result was 0, it now does not put blanks
where athe results were error messages. Here is exactly the equation I tried:

=IF(OR(ISERROR(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)),
VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A2,'Data
Base'!$A$1:$Y$413,14,FALSE))

Do you see the problem? Or, can you tell me the easier way?
--
Julie


"akphidelt" wrote:

There might be a shorter solution out there but this should work

=IF(OR(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A17,'Dat a
Base'!$A$1:$Y$413,14,FALSE))

"Julie" wrote:

Hi,
I have been successfully using the following statement:

=IF(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),"",VLOOKUP(A17,'Data Base'!$A$1:$Y$413,14,FALSE))

I want to add another if to this, so that I get:
If lookup results in error message, leave blank (first part above)
If lookup results in the value 0, leave blank (how do I add this?)
Otherwise, put result of lookup (second part above)

How do I had the the second IF to this equation so that if the lookup
results in the value 0, leave blank?
--
Julie

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default if statements

I was unaware that excel did that because I thought it evaluated the
expression to True, but it just creates an error... try this

=IF(ISERROR(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)),""
IF(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)=0,"",VLOOKUP(A2,'Data
Base'!$A$1:$Y$413,14,FALSE)))

"Julie" wrote:

I must be doing something wrong - I tried your equation and while it did
succeed in putting blanks where the result was 0, it now does not put blanks
where athe results were error messages. Here is exactly the equation I tried:

=IF(OR(ISERROR(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)),
VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A2,'Data
Base'!$A$1:$Y$413,14,FALSE))

Do you see the problem? Or, can you tell me the easier way?
--
Julie


"akphidelt" wrote:

There might be a shorter solution out there but this should work

=IF(OR(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A17,'Dat a
Base'!$A$1:$Y$413,14,FALSE))

"Julie" wrote:

Hi,
I have been successfully using the following statement:

=IF(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),"",VLOOKUP(A17,'Data Base'!$A$1:$Y$413,14,FALSE))

I want to add another if to this, so that I get:
If lookup results in error message, leave blank (first part above)
If lookup results in the value 0, leave blank (how do I add this?)
Otherwise, put result of lookup (second part above)

How do I had the the second IF to this equation so that if the lookup
results in the value 0, leave blank?
--
Julie

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 150
Default if statements

OK - I added one comma to your equation and it worked - I added it right
after the first "" in the equation.

Thanks a bunch!
--
Julie


"akphidelt" wrote:

I was unaware that excel did that because I thought it evaluated the
expression to True, but it just creates an error... try this

=IF(ISERROR(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)),""
IF(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)=0,"",VLOOKUP(A2,'Data
Base'!$A$1:$Y$413,14,FALSE)))

"Julie" wrote:

I must be doing something wrong - I tried your equation and while it did
succeed in putting blanks where the result was 0, it now does not put blanks
where athe results were error messages. Here is exactly the equation I tried:

=IF(OR(ISERROR(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)),
VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A2,'Data
Base'!$A$1:$Y$413,14,FALSE))

Do you see the problem? Or, can you tell me the easier way?
--
Julie


"akphidelt" wrote:

There might be a shorter solution out there but this should work

=IF(OR(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A17,'Dat a
Base'!$A$1:$Y$413,14,FALSE))

"Julie" wrote:

Hi,
I have been successfully using the following statement:

=IF(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),"",VLOOKUP(A17,'Data Base'!$A$1:$Y$413,14,FALSE))

I want to add another if to this, so that I get:
If lookup results in error message, leave blank (first part above)
If lookup results in the value 0, leave blank (how do I add this?)
Otherwise, put result of lookup (second part above)

How do I had the the second IF to this equation so that if the lookup
results in the value 0, leave blank?
--
Julie



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default if statements

Nice call,

glad it worked

"Julie" wrote:

OK - I added one comma to your equation and it worked - I added it right
after the first "" in the equation.

Thanks a bunch!
--
Julie


"akphidelt" wrote:

I was unaware that excel did that because I thought it evaluated the
expression to True, but it just creates an error... try this

=IF(ISERROR(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)),""
IF(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)=0,"",VLOOKUP(A2,'Data
Base'!$A$1:$Y$413,14,FALSE)))

"Julie" wrote:

I must be doing something wrong - I tried your equation and while it did
succeed in putting blanks where the result was 0, it now does not put blanks
where athe results were error messages. Here is exactly the equation I tried:

=IF(OR(ISERROR(VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)),
VLOOKUP(A2,'Data Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A2,'Data
Base'!$A$1:$Y$413,14,FALSE))

Do you see the problem? Or, can you tell me the easier way?
--
Julie


"akphidelt" wrote:

There might be a shorter solution out there but this should work

=IF(OR(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)=0),"",VLOOKUP(A17,'Dat a
Base'!$A$1:$Y$413,14,FALSE))

"Julie" wrote:

Hi,
I have been successfully using the following statement:

=IF(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),"",VLOOKUP(A17,'Data Base'!$A$1:$Y$413,14,FALSE))

I want to add another if to this, so that I get:
If lookup results in error message, leave blank (first part above)
If lookup results in the value 0, leave blank (how do I add this?)
Otherwise, put result of lookup (second part above)

How do I had the the second IF to this equation so that if the lookup
results in the value 0, leave blank?
--
Julie

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default if statements

I bet you really only want to hide that 0 only if the "sending" cell's value was
empty. You'd still want to see the 0 if that's what the cell contained.

If I'm right:

=if(isna(vlookup(...)),"",if(vlookup(...)="","",vl ookup(...))))

or

=if(iserror(1/len(vlookup(...)),"",vlookup(...))

Julie wrote:

Hi,
I have been successfully using the following statement:

=IF(ISERROR(VLOOKUP(A17,'Data
Base'!$A$1:$Y$413,14,FALSE)),"",VLOOKUP(A17,'Data Base'!$A$1:$Y$413,14,FALSE))

I want to add another if to this, so that I get:
If lookup results in error message, leave blank (first part above)
If lookup results in the value 0, leave blank (how do I add this?)
Otherwise, put result of lookup (second part above)

How do I had the the second IF to this equation so that if the lookup
results in the value 0, leave blank?
--
Julie


--

Dave Peterson
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
If, then statements sarahz11 Excel Discussion (Misc queries) 4 March 20th 07 06:46 PM
If, Then Statements RS Excel Worksheet Functions 0 November 30th 06 05:38 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
IF Statements rfryan61 Excel Discussion (Misc queries) 6 September 9th 05 05:54 PM
If statements cassandra Excel Worksheet Functions 4 September 8th 05 09:04 PM


All times are GMT +1. The time now is 12:42 AM.

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"