Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default IF Statement Problem

I have two columns I want to concentrate on. Column A is
the result of a folmula in the shape of a vlookup.

If the value in A is #N/A I want to take this into
consideration. This is the first thing I dont know how
to do. I also need to take into consideration another
column to get the result I need.

Something like this

=IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")

I know that is wrong but I know it is possible,

Can someone tell me how to do this. It will be a great
help. Where I have put my "stw" OR "iwo", this 3 letter
seq
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default IF Statement Problem

One way:

=IF(AND(ISNA(B1),OR(D2="stw",D2="iwo")),1,0)

or, more compactly (since XL converts TRUE to 1 and FALSE to 0 in math
operations:

=ISNA(B1)*((D2="stw")+(D2="iwo"))

This assumes that you want 1 or 0, not the strings "1" or "0".


In article ,
wrote:

I have two columns I want to concentrate on. Column A is
the result of a folmula in the shape of a vlookup.

If the value in A is #N/A I want to take this into
consideration. This is the first thing I dont know how
to do. I also need to take into consideration another
column to get the result I need.

Something like this

=IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")

I know that is wrong but I know it is possible,

Can someone tell me how to do this. It will be a great
help. Where I have put my "stw" OR "iwo", this 3 letter
seq

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default IF Statement Problem

there is a function ISNA

so =if(isna(vlookup(,,,)), "Not Found", vlookup(,,,))

HTH

" wrote:

I have two columns I want to concentrate on. Column A is
the result of a folmula in the shape of a vlookup.

If the value in A is #N/A I want to take this into
consideration. This is the first thing I dont know how
to do. I also need to take into consideration another
column to get the result I need.

Something like this

=IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")

I know that is wrong but I know it is possible,

Can someone tell me how to do this. It will be a great
help. Where I have put my "stw" OR "iwo", this 3 letter
seq

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default IF Statement Problem

Once you get the isna down pat then you can add the ands and ors

=if(and(isna(vlookup(,,,)), or(find("stw", D2)0, find("iwo", D2)0)), 1, 0)

Without knowing a few more specifics in terms of cell references this is as
far as I can help you...

HTH

" wrote:

I have two columns I want to concentrate on. Column A is
the result of a folmula in the shape of a vlookup.

If the value in A is #N/A I want to take this into
consideration. This is the first thing I dont know how
to do. I also need to take into consideration another
column to get the result I need.

Something like this

=IF(B1="#N/A" AND D2 contains "stw" OR "iwo" THEN "1","0")

I know that is wrong but I know it is possible,

Can someone tell me how to do this. It will be a great
help. Where I have put my "stw" OR "iwo", this 3 letter
seq

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
Problem with IF Statement M Peddle Excel Worksheet Functions 9 July 28th 08 07:18 PM
IF Statement Problem Daren Excel Worksheet Functions 3 September 18th 07 04:43 PM
IF Statement problem MarkFrost39 Excel Worksheet Functions 3 September 6th 07 07:54 PM
Problem with if statement Marie Excel Programming 13 February 7th 05 01:25 AM
IF statement problem Jim Robinson Excel Programming 1 May 1st 04 09:08 PM


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