Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 331
Default If with AND - Is this correct?

What is wrong with this formula?

=IF(AND('Node 01'!A1:A1000=A22,'Node 01'!B1:B1000=B22),'Node 01'!H1:H1000,0)

Looking at "A" and "B" for a match and the anwser is "H" the same row as "A&B"
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default If with AND - Is this correct?

Believe this expression, array-entered with CTRL+SHIFT+ENTER (instead of just
pressing ENTER) will return what you're after:
=INDEX('Node 01'!H1:H1000,MATCH(1,('Node 01'!A1:A1000=A22)*('Node
01'!B1:B1000=B22),0))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Greg" wrote:
What is wrong with this formula?

=IF(AND('Node 01'!A1:A1000=A22,'Node 01'!B1:B1000=B22),'Node 01'!H1:H1000,0)

Looking at "A" and "B" for a match and the anwser is "H" the same row as "A&B"

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 331
Default If with AND - Is this correct?

It came back with #NA

"Max" wrote:

Believe this expression, array-entered with CTRL+SHIFT+ENTER (instead of just
pressing ENTER) will return what you're after:
=INDEX('Node 01'!H1:H1000,MATCH(1,('Node 01'!A1:A1000=A22)*('Node
01'!B1:B1000=B22),0))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Greg" wrote:
What is wrong with this formula?

=IF(AND('Node 01'!A1:A1000=A22,'Node 01'!B1:B1000=B22),'Node 01'!H1:H1000,0)

Looking at "A" and "B" for a match and the anwser is "H" the same row as "A&B"

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default If with AND - Is this correct?

"Greg" wrote:
It came back with #NA


Did you remember to "array-enter" the formula ie to press CTRL+SHIFT+ENTER
CSE] to confirm the formula (instead of just pressing ENTER)??

If you did the above confirmation correctly, you should see Excel wrap curly
braces: { } around the formula in the formula bar. If you don't see it (the
curly braces), click inside the formula bar and try the CSE confirmation
again.

The visual check on the curly braces is the *only way* (afaik) to check that
the formula is correctly array-entered. If the formula is NOT array-entered,
it'll return an #N/A, despite there being a obvious match.

Here's a quick working sample to prove that it works:
http://www.freefilehosting.net/download/3d5cd
Array index n match.xls
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default If with AND - Is this correct?

It's a pity that you seem to have dismissed my responses
It should work fine
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


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
Correct Chart P. Zicari Charts and Charting in Excel 3 October 25th 07 06:17 PM
How do I correct this calculation? Rebecca Excel Worksheet Functions 3 March 24th 06 12:04 AM
not copying correct value Martin Wheeler Excel Worksheet Functions 4 February 28th 06 11:42 PM
If correct, add 1 sparky3883 Excel Worksheet Functions 2 October 11th 05 07:52 PM
if(b2=1,b3,0) is this correct [email protected] Excel Worksheet Functions 2 March 21st 05 08:21 AM


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