Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RFJ
 
Posts: n/a
Default Lookup with a bizarre twist

In each cell of column B (rows 3 to 150), there is either nothing (Null) or
an asterisk. All the asterisked cells will be in consecutive rows - but
where they start and finish is variable depending on other calculations in
the worksheet.

I want to be able to find the top and bottom row that has an asterisk in it
and return the corresponding cell values in column A.

eg

a
b
c *
d *
e *
f *
g
h

I'd be looking for two formulae - one to identify 'c' as the top value and
'f' as the bottom value.

Can SKS help.

Many thanks in advance.

Rob








  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
using array formulas (entered with CTRL+SHIFT+ENTER):
=INDEX(A1:A150,MIN(IF(B3:B150="*",ROW(B3:B150))))
and
=INDEX(A1:A150,MAX(IF(B3:B150="*",ROW(B3:B150))))

--
Regards
Frank Kabel
Frankfurt, Germany

RFJ wrote:
In each cell of column B (rows 3 to 150), there is either nothing
(Null) or an asterisk. All the asterisked cells will be in
consecutive rows - but where they start and finish is variable
depending on other calculations in the worksheet.

I want to be able to find the top and bottom row that has an asterisk
in it and return the corresponding cell values in column A.

eg

a
b
c *
d *
e *
f *
g
h

I'd be looking for two formulae - one to identify 'c' as the top
value and 'f' as the bottom value.

Can SKS help.

Many thanks in advance.

Rob



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

One way, for top

=INDEX(A1:A1000,MATCH("~*",B1:B1000,0))

for bottom

=INDEX(A1:A1000,MAX((B1:B1000="*")*(ROW(B1:B1000)) ))

the latter entered with ctrl + shift & enter



Regards,

Peo Sjoblom


"RFJ" wrote:

In each cell of column B (rows 3 to 150), there is either nothing (Null) or
an asterisk. All the asterisked cells will be in consecutive rows - but
where they start and finish is variable depending on other calculations in
the worksheet.

I want to be able to find the top and bottom row that has an asterisk in it
and return the corresponding cell values in column A.

eg

a
b
c *
d *
e *
f *
g
h

I'd be looking for two formulae - one to identify 'c' as the top value and
'f' as the bottom value.

Can SKS help.

Many thanks in advance.

Rob









  #4   Report Post  
Domenic
 
Posts: n/a
Default

Also...

Top...

=INDEX(A1:A150,MATCH("~*",B1:B150,0))

Bottom...

=INDEX(A1:A150,MATCH("~*",B1:B150))

OR

=LOOKUP(2,1/(B1:B150="*"),A1:A150)

Hope this helps!

In article ,
"RFJ" wrote:

In each cell of column B (rows 3 to 150), there is either nothing (Null) or
an asterisk. All the asterisked cells will be in consecutive rows - but
where they start and finish is variable depending on other calculations in
the worksheet.

I want to be able to find the top and bottom row that has an asterisk in it
and return the corresponding cell values in column A.

eg

a
b
c *
d *
e *
f *
g
h

I'd be looking for two formulae - one to identify 'c' as the top value and
'f' as the bottom value.

Can SKS help.

Many thanks in advance.

Rob

  #5   Report Post  
Domenic
 
Posts: n/a
Default

Please disregard the second formula. It doesn't work with other data
interspersed.

In article ,
Domenic wrote:

Also...

Top...

=INDEX(A1:A150,MATCH("~*",B1:B150,0))

Bottom...

=INDEX(A1:A150,MATCH("~*",B1:B150))

OR

=LOOKUP(2,1/(B1:B150="*"),A1:A150)

Hope this helps!

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
Lookup Problem StephanieH Excel Worksheet Functions 1 December 20th 04 06:17 PM
Index table lookup anomaly Carole O Excel Worksheet Functions 9 December 9th 04 04:33 PM
Excel Lookup Functions Paul Adams Excel Worksheet Functions 1 November 10th 04 02:40 PM
Another Lookup function, please Butch Excel Worksheet Functions 3 November 3rd 04 08:52 AM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


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