Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Match second occurance of value

I am trying to match the second time a value occurs in a horizontal range.
This formula sometimes works and other times does not.... the value I am
matching is TRUE
=HLOOKUP(TRUE,$B$6:$K$7,2,TRUE)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Match second occurance of value

John wrote:
I am trying to match the second time a value occurs in a horizontal range.
This formula sometimes works and other times does not.... the value I am
matching is TRUE
=HLOOKUP(TRUE,$B$6:$K$7,2,TRUE)



This array formula (commit with CTRL+SHIFT+ENTER) should work:

=INDEX($B$7:$K$7,,SMALL(IF($B$6:$K$6= TRUE ,
COLUMN($B$6:$K$6)-COLUMN($B$6)+1,""), 2 ))
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Match second occurance of value

=INDEX(B6:K7,2,SMALL(IF(B6:K7=TRUE,COLUMN(B6:K7)-COLUMN(B6)+1,COLUMN(B6)+1),2))

as array worked....

"John" wrote:

I am trying to match the second time a value occurs in a horizontal range.
This formula sometimes works and other times does not.... the value I am
matching is TRUE
=HLOOKUP(TRUE,$B$6:$K$7,2,TRUE)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Match second occurance of value

actually that doesn't quite work either

"John" wrote:

=INDEX(B6:K7,2,SMALL(IF(B6:K7=TRUE,COLUMN(B6:K7)-COLUMN(B6)+1,COLUMN(B6)+1),2))

as array worked....

"John" wrote:

I am trying to match the second time a value occurs in a horizontal range.
This formula sometimes works and other times does not.... the value I am
matching is TRUE
=HLOOKUP(TRUE,$B$6:$K$7,2,TRUE)

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Match second occurance of value

thats what I just came up with thanks!

"Glenn" wrote:

John wrote:
I am trying to match the second time a value occurs in a horizontal range.
This formula sometimes works and other times does not.... the value I am
matching is TRUE
=HLOOKUP(TRUE,$B$6:$K$7,2,TRUE)



This array formula (commit with CTRL+SHIFT+ENTER) should work:

=INDEX($B$7:$K$7,,SMALL(IF($B$6:$K$6= TRUE ,
COLUMN($B$6:$K$6)-COLUMN($B$6)+1,""), 2 ))
.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Match second occurance of value

Hello John,

=HLOOKUP(TRUE,INDEX(B6:K6,MATCH(TRUE,B6:J6,0)+1):K 7,2,0)

Normal function, not an array-formula.

Regards,
Bernd
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Match second occurance of value

If there will only be 2 instances of the lookup_value...

=LOOKUP(2,1/(B6:K6=TRUE),B7:K7)

--
Biff
Microsoft Excel MVP


"John" wrote in message
...
I am trying to match the second time a value occurs in a horizontal range.
This formula sometimes works and other times does not.... the value I am
matching is TRUE
=HLOOKUP(TRUE,$B$6:$K$7,2,TRUE)



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
Re-occurance Shannan Excel Discussion (Misc queries) 3 October 1st 09 05:52 PM
first and last occurance Darius Excel Worksheet Functions 7 April 23rd 09 06:49 PM
Count Occurance ab3d4u[_5_] Excel Worksheet Functions 2 September 12th 07 09:27 PM
occurance, pivot haviv Excel Discussion (Misc queries) 2 February 26th 07 02:43 PM
frequency for each occurance bjg Excel Worksheet Functions 3 November 24th 04 02:13 PM


All times are GMT +1. The time now is 08:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"