Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Help with simple if statement

Help required. Its a pretty basic if statement but it keeps returning the
wrong answer. I have 2 spreadsheets and I want to look up a column of
numbers in one spreadsheet and return "Priority" if it finds a match and
"Non-Priority" if it doesn't. It keeps returning "Non-Priority" even when I
know it should be returning "Priority". The syntax I have used is
If(A3='[spreadsheet name]sheet name'!$a:$a,"Priority","Non-priority"). What
am I doing wrong????
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Help with simple if statement

=IF(COUNTIF('[book name]Sheet name'!$A:$A,A3)0,"Priority","Non-Priority")
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Lou H" wrote:

Help required. Its a pretty basic if statement but it keeps returning the
wrong answer. I have 2 spreadsheets and I want to look up a column of
numbers in one spreadsheet and return "Priority" if it finds a match and
"Non-Priority" if it doesn't. It keeps returning "Non-Priority" even when I
know it should be returning "Priority". The syntax I have used is
If(A3='[spreadsheet name]sheet name'!$a:$a,"Priority","Non-priority"). What
am I doing wrong????

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with simple if statement

COUNTIF doesn't work on closed files.

Better to use something like:

=IF(ISNUMBER(MATCH(A3,'[spreadsheet name]sheet
name'!$a:$a,0)),"Priority","Non-priority")

--
Biff
Microsoft Excel MVP


"John C" <johnc@stateofdenial wrote in message
...
=IF(COUNTIF('[book name]Sheet name'!$A:$A,A3)0,"Priority","Non-Priority")
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Lou H" wrote:

Help required. Its a pretty basic if statement but it keeps returning
the
wrong answer. I have 2 spreadsheets and I want to look up a column of
numbers in one spreadsheet and return "Priority" if it finds a match and
"Non-Priority" if it doesn't. It keeps returning "Non-Priority" even
when I
know it should be returning "Priority". The syntax I have used is
If(A3='[spreadsheet name]sheet name'!$a:$a,"Priority","Non-priority").
What
am I doing wrong????



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Help with simple if statement

Hi,

Of course you might use VLOOKUP

=IF(ISNA(VLOOKUP(A1,'[spreadsheet name]sheet
name'!$A:$A,1,FALSE)),"non-priority","priority")

This works against a closed workbook.

--
Thanks,
Shane Devenshire


"Lou H" wrote:

Help required. Its a pretty basic if statement but it keeps returning the
wrong answer. I have 2 spreadsheets and I want to look up a column of
numbers in one spreadsheet and return "Priority" if it finds a match and
"Non-Priority" if it doesn't. It keeps returning "Non-Priority" even when I
know it should be returning "Priority". The syntax I have used is
If(A3='[spreadsheet name]sheet name'!$a:$a,"Priority","Non-priority"). What
am I doing wrong????

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
Simple IF statement Steve Douglas P2p, MCP Excel Worksheet Functions 4 September 10th 07 12:32 PM
Simple IF statement Dave F Excel Worksheet Functions 0 November 30th 06 05:49 PM
Simple IF statement Connie Martin Excel Worksheet Functions 0 November 30th 06 05:42 PM
Simple If Statement digital21st Excel Worksheet Functions 2 August 2nd 06 03:57 PM
Simple IF statement (hopefully!!) Jamesy Excel Discussion (Misc queries) 6 June 14th 06 08:10 PM


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

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"