Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Modify and add extra condition

Hi,

The following formula establishes if there is a match for B158

=IF(ISNA(MATCH(B158,'formula Test'!$A:$A,0)),IF(ISNA(MATCH(B158,'formula
Test'!A:A,0)),"No Match Found",B158),B158)

I now want to modify and add an extra condition.

When a match is found in 'formula Test'!$A:$A I want to establish if the
corresponding cell in column D contains a value and return that value
instead.

For example:

B158 = €śApples€ť

€śApples€ť has been match to A364 in 'formula Test'!$A:$A

The cell in D364 'formula Test'! = €śRed Apples€ť

The formula should return €śRed Apples€ť

If cell D364 had not contained a value then nothing should be returned.



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Modify and add extra condition

Your formula actually tests the condition twice. It only needs to be:

=IF(ISNA(MATCH(B158,'formula Test'!$A:$A,0)),"No Match Found",B158)

What you want now, though, is this:

=IF(ISNA(MATCH(B158,'formula Test'!$A:$A,0)),"No Match Found",IF(INDEX
('formula Test'!$D:$D,MATCH(B158,'formula Test'!$A:$A,0))="","",INDEX
('formula Test'!$D:$D,MATCH(B158,'formula Test'!$A:$A,0))))

This will return No Match Found if there is no match and will return
an empty cell if the corresponding cell in column D is empty when a
match is found.

Hope this helps.

Pete

On Nov 17, 10:43*am, gootroots
wrote:
Hi,

The following formula establishes if there is a match for B158

=IF(ISNA(MATCH(B158,'formula Test'!$A:$A,0)),IF(ISNA(MATCH(B158,'formula
Test'!A:A,0)),"No Match Found",B158),B158)

I now want to modify and add an extra condition.

When a match is found in 'formula Test'!$A:$A *I want to establish if the
corresponding cell *in column D contains a value and return that value
instead.

For example:

B158 = “Apples”

“Apples” has been match to A364 in 'formula Test'!$A:$A

The cell in D364 'formula Test'! *= “Red Apples”

The formula should return “Red Apples”

If cell D364 had not contained a value then nothing should be returned.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 506
Default Modify and add extra condition

Try this€¦

=IF(B158="","",IF(ISNA(VLOOKUP(B158,'formula Test'!A:D,4,0)),"No Match
Found",VLOOKUP(B158,'formula Test'!A:D,4,0)))

If this post helps, Click Yes!

--------------------
(Ms-Exl-Learner)
--------------------



"gootroots" wrote:

Hi,

The following formula establishes if there is a match for B158

=IF(ISNA(MATCH(B158,'formula Test'!$A:$A,0)),IF(ISNA(MATCH(B158,'formula
Test'!A:A,0)),"No Match Found",B158),B158)

I now want to modify and add an extra condition.

When a match is found in 'formula Test'!$A:$A I want to establish if the
corresponding cell in column D contains a value and return that value
instead.

For example:

B158 = €śApples€ť

€śApples€ť has been match to A364 in 'formula Test'!$A:$A

The cell in D364 'formula Test'! = €śRed Apples€ť

The formula should return €śRed Apples€ť

If cell D364 had not contained a value then nothing should be returned.



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
Modify a UDF please? Excel Helps Excel Worksheet Functions 2 January 23rd 08 09:40 AM
Modify a UDF please? Excel Helps Excel Worksheet Functions 0 January 23rd 08 12:10 AM
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
Condition 1 overules condition 2? Bultgren Excel Worksheet Functions 2 January 20th 06 12:29 PM


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