Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Getting correct results for lookup?

I have this formula:

=LOOKUP("YES",D9:D32,A9:A32)

that returns the number in the appropriate row in column A. This is not
working on every sheet in the workbook. I suspect this is because the entries
in column A can go like this: 1,2,3,3,4,5,RESTART,1,2,3,4,4,5,6, etc.

I get the correct result now, wether it's a number or the word RESTART, but
when I try to add an entry the results of the formula do not update. Let me
clarify, it does update on some sheets, but not all.

What I need is the entry listed in column A for the last row in column D
that contains the word "YES". When the last instance of "YES" is in, say, D15
and I add the word "YES" to D16, I need the formula to return the entry in
A16, but it stays with what's in A15. Again, this is not happening on every
sheet. Most of them will update with the entry in A16, just a few aren't.

I've tried checking for extra spaces, formatting the cell, any ideas?

Thanks in advance,

tgcali
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Getting correct results for lookup?

Right from the help file for the lookup funciton...

"Important The values in lookup_vector must be placed in ascending order:
....,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give
the correct value."

Functions like match, vlookup and hlookup allow for exact match searches
through unsorted ranges, but not Lookup...
--
HTH...

Jim Thomlinson


"tgcali" wrote:

I have this formula:

=LOOKUP("YES",D9:D32,A9:A32)

that returns the number in the appropriate row in column A. This is not
working on every sheet in the workbook. I suspect this is because the entries
in column A can go like this: 1,2,3,3,4,5,RESTART,1,2,3,4,4,5,6, etc.

I get the correct result now, wether it's a number or the word RESTART, but
when I try to add an entry the results of the formula do not update. Let me
clarify, it does update on some sheets, but not all.

What I need is the entry listed in column A for the last row in column D
that contains the word "YES". When the last instance of "YES" is in, say, D15
and I add the word "YES" to D16, I need the formula to return the entry in
A16, but it stays with what's in A15. Again, this is not happening on every
sheet. Most of them will update with the entry in A16, just a few aren't.

I've tried checking for extra spaces, formatting the cell, any ideas?

Thanks in advance,

tgcali

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Getting correct results for lookup?

Try this:

=LOOKUP(2,1/(D9:D32="yes"),A9:A32)

If there are no instances of "yes" the formula will return #N/A.

--
Biff
Microsoft Excel MVP


"tgcali" wrote in message
...
I have this formula:

=LOOKUP("YES",D9:D32,A9:A32)

that returns the number in the appropriate row in column A. This is not
working on every sheet in the workbook. I suspect this is because the
entries
in column A can go like this: 1,2,3,3,4,5,RESTART,1,2,3,4,4,5,6, etc.

I get the correct result now, wether it's a number or the word RESTART,
but
when I try to add an entry the results of the formula do not update. Let
me
clarify, it does update on some sheets, but not all.

What I need is the entry listed in column A for the last row in column D
that contains the word "YES". When the last instance of "YES" is in, say,
D15
and I add the word "YES" to D16, I need the formula to return the entry in
A16, but it stays with what's in A15. Again, this is not happening on
every
sheet. Most of them will update with the entry in A16, just a few aren't.

I've tried checking for extra spaces, formatting the cell, any ideas?

Thanks in advance,

tgcali



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Getting correct results for lookup?

Biff,

Seems to have worked like a dream. Thank you very much!

tgcali

"T. Valko" wrote:

Try this:

=LOOKUP(2,1/(D9:D32="yes"),A9:A32)

If there are no instances of "yes" the formula will return #N/A.

--
Biff
Microsoft Excel MVP


"tgcali" wrote in message
...
I have this formula:

=LOOKUP("YES",D9:D32,A9:A32)

that returns the number in the appropriate row in column A. This is not
working on every sheet in the workbook. I suspect this is because the
entries
in column A can go like this: 1,2,3,3,4,5,RESTART,1,2,3,4,4,5,6, etc.

I get the correct result now, wether it's a number or the word RESTART,
but
when I try to add an entry the results of the formula do not update. Let
me
clarify, it does update on some sheets, but not all.

What I need is the entry listed in column A for the last row in column D
that contains the word "YES". When the last instance of "YES" is in, say,
D15
and I add the word "YES" to D16, I need the formula to return the entry in
A16, but it stays with what's in A15. Again, this is not happening on
every
sheet. Most of them will update with the entry in A16, just a few aren't.

I've tried checking for extra spaces, formatting the cell, any ideas?

Thanks in advance,

tgcali




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Getting correct results for lookup?

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"tgcali" wrote in message
...
Biff,

Seems to have worked like a dream. Thank you very much!

tgcali

"T. Valko" wrote:

Try this:

=LOOKUP(2,1/(D9:D32="yes"),A9:A32)

If there are no instances of "yes" the formula will return #N/A.

--
Biff
Microsoft Excel MVP


"tgcali" wrote in message
...
I have this formula:

=LOOKUP("YES",D9:D32,A9:A32)

that returns the number in the appropriate row in column A. This is not
working on every sheet in the workbook. I suspect this is because the
entries
in column A can go like this: 1,2,3,3,4,5,RESTART,1,2,3,4,4,5,6, etc.

I get the correct result now, wether it's a number or the word RESTART,
but
when I try to add an entry the results of the formula do not update.
Let
me
clarify, it does update on some sheets, but not all.

What I need is the entry listed in column A for the last row in column
D
that contains the word "YES". When the last instance of "YES" is in,
say,
D15
and I add the word "YES" to D16, I need the formula to return the entry
in
A16, but it stays with what's in A15. Again, this is not happening on
every
sheet. Most of them will update with the entry in A16, just a few
aren't.

I've tried checking for extra spaces, formatting the cell, any ideas?

Thanks in advance,

tgcali






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
what formulas will give correct results TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 February 26th 07 02:13 AM
How do I get correct results when LOOKUP with calculated numbers onthemountain Excel Worksheet Functions 2 July 20th 06 01:13 AM
Lookup and List Results DSCAVOTTO Excel Worksheet Functions 5 April 21st 06 08:59 PM
vlookup: I have to double click each cell to get correct results? gillyd Excel Worksheet Functions 2 January 24th 06 01:06 PM
My IF(AND passes logical, but doesn't reveal correct results Washdc Excel Worksheet Functions 6 July 31st 05 05:10 AM


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