Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
selvaraj
 
Posts: n/a
Default Searching for a criteria in array of cells within an IF statement


Hi,

I am having trouble referencing an array of cells within the IF
function, which need to be searched for a certain criteria.

I need the formula to search for a criteria, and if found return the
value next to the criteria.

If the criteria is not found then I want value next to another fixed
criteria (which I know will always be there) to be returned.

Any suggestions?

Thanks


--
selvaraj
------------------------------------------------------------------------
selvaraj's Profile: http://www.excelforum.com/member.php...o&userid=25674
View this thread: http://www.excelforum.com/showthread...hreadid=390928

  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Selvaraj,

=IF(ISERROR(MATCH(PossiblyNotThereValue, CritValues, False),
INDEX(Values,MATCH(Fixed,CritValues,False)),
INDEX(Values,MATCH(PossiblyNotThereValue,CritValue s,False)))

like so, if your criteria are in A2:A12, and the information you want returned is in B2:B12:

=IF(ISERROR(MATCH("Selvaraj", A2:A12, FALSE)), INDEX(B2:B12,MATCH("Always There",A2:A12,FALSE)),
INDEX(B2:B12,MATCH("Selvaraj",A2:A12,FALSE)))

HTH,
Bernie
MS Excel MVP


"selvaraj" wrote in message
...

Hi,

I am having trouble referencing an array of cells within the IF
function, which need to be searched for a certain criteria.

I need the formula to search for a criteria, and if found return the
value next to the criteria.

If the criteria is not found then I want value next to another fixed
criteria (which I know will always be there) to be returned.

Any suggestions?

Thanks


--
selvaraj
------------------------------------------------------------------------
selvaraj's Profile: http://www.excelforum.com/member.php...o&userid=25674
View this thread: http://www.excelforum.com/showthread...hreadid=390928



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
Array Formula w/ Multiple SumIf Criteria Andy Excel Worksheet Functions 3 July 13th 05 08:56 PM
Switching cells DrJBN Excel Discussion (Misc queries) 5 May 6th 05 10:45 PM
count non blank cells which meet criteria in another column cmarsh5035 Excel Worksheet Functions 2 February 16th 05 04:32 PM
To safety merge cells without data destroyed, and smart unmerge! Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:17 AM
copy group of cells to another group of cells using "IF" in third Chuckak Excel Worksheet Functions 2 November 10th 04 06:04 PM


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