#1   Report Post  
Larry
 
Posts: n/a
Default OR function

Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)
  #2   Report Post  
bj
 
Posts: n/a
Default

try
=if(match(c5,n61:n83,0)),VLOOKUP(C5,Matrix!$A$2:$A B$28,MATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)

"Larry" wrote:

Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)

  #3   Report Post  
N Harkawat
 
Posts: n/a
Default

=if(sumproduct(--(n61:n83=c5))=1,VLOOKUP(C5,Matrix!$A$2:$AB$28,MAT CH(B5,Matrix!$A$1:$AB$1,0),0),Q60)


"Larry" wrote in message
...
Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)



  #4   Report Post  
Niek Otten
 
Posts: n/a
Default

Maybe this?

=IF(ISNA(VLOOKUP(C5,N61:N83,1,FALSE)),Q60,VLOOKUP( C5,Matrix!$A$2:$AB$28,MATCH(B5,Matrix!$A$1:$AB$1,0 ),FALSE))

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"Larry" wrote in message
...
Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)



  #5   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

It certainly is

=IF(ISNUMBER(MATCH(C5,N61:N83,0)),VLOOKUP(C5,Matri x!$A$2:$AB$28,MATCH(B5,Matrix!$A$1:$AB$1,0),FALSE) ,Q60)


Regards,

Peo Sjoblom

"Larry" wrote:

Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)



  #6   Report Post  
Larry
 
Posts: n/a
Default

This works perfectly. Help me to understand. Why ISNUMBER? MATCH returns a
relative row or column number,right? The cells N61:N83 and B5, C5 contain
text.

"Peo Sjoblom" wrote:

It certainly is

=IF(ISNUMBER(MATCH(C5,N61:N83,0)),VLOOKUP(C5,Matri x!$A$2:$AB$28,MATCH(B5,Matrix!$A$1:$AB$1,0),FALSE) ,Q60)


Regards,

Peo Sjoblom

"Larry" wrote:

Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)

  #7   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Yes match will return a relative row number if there is a match, thus if a
row number is returned one of the cells will match C5 and isnumber (row
number) is just to return TRUE or FALSE otherwise if not found it will
return #N/A so it basically tests for that any of the cells in N61:N83
holds the value in C5

--
Regards,

Peo Sjoblom


"Larry" wrote in message
...
This works perfectly. Help me to understand. Why ISNUMBER? MATCH
returns a
relative row or column number,right? The cells N61:N83 and B5, C5 contain
text.

"Peo Sjoblom" wrote:

It certainly is

=IF(ISNUMBER(MATCH(C5,N61:N83,0)),VLOOKUP(C5,Matri x!$A$2:$AB$28,MATCH(B5,Matrix!$A$1:$AB$1,0),FALSE) ,Q60)


Regards,

Peo Sjoblom

"Larry" wrote:

Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)


  #8   Report Post  
Leo Heuser
 
Posts: n/a
Default

Larry

Another option:

=IF(OR(C5=N61:N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)

Since this is an array formula, it must be entered with
<Shift<Ctrl<Enter,
also if edited later.
--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Larry" skrev i en meddelelse
...
Is there a way to shorten or compress the "OR" portion of this formula

=IF(OR(C5=N61,C5=N62,C5=N63,C5=N64,C5=N65,C5=N66,C 5=N67,C5=N68,C5=N69,C5=N70,C5=N71,C5=N72,C5=N73,C5 =N74,C5=N75,C5=N76,C5=N77,C5=N78,C5=N79,C5=N80,C5= N81,C5=N82,C5=N83),VLOOKUP(C5,Matrix!$A$2:$AB$28,M ATCH(B5,Matrix!$A$1:$AB$1,0),FALSE),Q60)




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
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM


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