Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Lookup returns unexpected result

Hi Guys its me again sorry. Below is the function and the results obtained. I
have changed the cell format to all sorts with no effect.

Hope someone can help. Happy to email the spreadsheet if that will help, no
laughing at my probable poor formulas.

=IFERROR(LOOKUP('MatRoster'!C7,{7,730,8,830,9,13,1 330,1430,17,2115,2130,2230,2245},{"AM","AM","AM"," AM","AM","PM","PM","PM","PM","ND","ND","ND","ND"}) ,0)

7 Returns AM
730 Returns PM should be AM
8 Returns AM
830 Returns PM should be PM
9 Returns AM
13 Returns PM
1330 Returns PM
1430 Returns PM
17 Returns PM
2115 Returns PM
2130 Returns ND
2230 Returns ND
2245 Returns ND

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Lookup returns unexpected result

Dear David

This should work. I have sorted the lookup elements

=LOOKUP(MatRoster!C8,{7,8,9,13,17,730,830,1330,143 0,2115,2130,2230,2245;"AM","AM","AM","PM","PM","AM ","AM","PM","PM","ND","ND","ND","ND"})


If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi Guys its me again sorry. Below is the function and the results obtained. I
have changed the cell format to all sorts with no effect.

Hope someone can help. Happy to email the spreadsheet if that will help, no
laughing at my probable poor formulas.

=IFERROR(LOOKUP('MatRoster'!C7,{7,730,8,830,9,13,1 330,1430,17,2115,2130,2230,2245},{"AM","AM","AM"," AM","AM","PM","PM","PM","PM","ND","ND","ND","ND"}) ,0)

7 Returns AM
730 Returns PM should be AM
8 Returns AM
830 Returns PM should be PM
9 Returns AM
13 Returns PM
1330 Returns PM
1430 Returns PM
17 Returns PM
2115 Returns PM
2130 Returns ND
2230 Returns ND
2245 Returns ND

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Lookup returns unexpected result

Hi Jacob that seems to work well.
If its not to detailed or much trouble would love an explanation why so i do
not make a similar mistake.

THANKS HEAPS!!

"Jacob Skaria" wrote:

Dear David

This should work. I have sorted the lookup elements

=LOOKUP(MatRoster!C8,{7,8,9,13,17,730,830,1330,143 0,2115,2130,2230,2245;"AM","AM","AM","PM","PM","AM ","AM","PM","PM","ND","ND","ND","ND"})


If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi Guys its me again sorry. Below is the function and the results obtained. I
have changed the cell format to all sorts with no effect.

Hope someone can help. Happy to email the spreadsheet if that will help, no
laughing at my probable poor formulas.

=IFERROR(LOOKUP('MatRoster'!C7,{7,730,8,830,9,13,1 330,1430,17,2115,2130,2230,2245},{"AM","AM","AM"," AM","AM","PM","PM","PM","PM","ND","ND","ND","ND"}) ,0)

7 Returns AM
730 Returns PM should be AM
8 Returns AM
830 Returns PM should be PM
9 Returns AM
13 Returns PM
1330 Returns PM
1430 Returns PM
17 Returns PM
2115 Returns PM
2130 Returns ND
2230 Returns ND
2245 Returns ND

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Lookup returns unexpected result

Dear David

The lookup range within this function is a single row or single column of
data that is sorted in ascending order and if not the function will return
the incorrect value. If the Lookup function cannot find an exact match it
chooses the largest value in the range that is less than or equal to the
value. If the value is smaller than all of the values in the lookup range
then the Lookup function will return #N/A.

Hope this helps..

If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi Jacob that seems to work well.
If its not to detailed or much trouble would love an explanation why so i do
not make a similar mistake.

THANKS HEAPS!!

"Jacob Skaria" wrote:

Dear David

This should work. I have sorted the lookup elements

=LOOKUP(MatRoster!C8,{7,8,9,13,17,730,830,1330,143 0,2115,2130,2230,2245;"AM","AM","AM","PM","PM","AM ","AM","PM","PM","ND","ND","ND","ND"})


If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi Guys its me again sorry. Below is the function and the results obtained. I
have changed the cell format to all sorts with no effect.

Hope someone can help. Happy to email the spreadsheet if that will help, no
laughing at my probable poor formulas.

=IFERROR(LOOKUP('MatRoster'!C7,{7,730,8,830,9,13,1 330,1430,17,2115,2130,2230,2245},{"AM","AM","AM"," AM","AM","PM","PM","PM","PM","ND","ND","ND","ND"}) ,0)

7 Returns AM
730 Returns PM should be AM
8 Returns AM
830 Returns PM should be PM
9 Returns AM
13 Returns PM
1330 Returns PM
1430 Returns PM
17 Returns PM
2115 Returns PM
2130 Returns ND
2230 Returns ND
2245 Returns ND

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Lookup returns unexpected result

Hi Jacob
Appreciate your time and yes helps. Again thanks

"Jacob Skaria" wrote:

Dear David

The lookup range within this function is a single row or single column of
data that is sorted in ascending order and if not the function will return
the incorrect value. If the Lookup function cannot find an exact match it
chooses the largest value in the range that is less than or equal to the
value. If the value is smaller than all of the values in the lookup range
then the Lookup function will return #N/A.

Hope this helps..

If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi Jacob that seems to work well.
If its not to detailed or much trouble would love an explanation why so i do
not make a similar mistake.

THANKS HEAPS!!

"Jacob Skaria" wrote:

Dear David

This should work. I have sorted the lookup elements

=LOOKUP(MatRoster!C8,{7,8,9,13,17,730,830,1330,143 0,2115,2130,2230,2245;"AM","AM","AM","PM","PM","AM ","AM","PM","PM","ND","ND","ND","ND"})


If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi Guys its me again sorry. Below is the function and the results obtained. I
have changed the cell format to all sorts with no effect.

Hope someone can help. Happy to email the spreadsheet if that will help, no
laughing at my probable poor formulas.

=IFERROR(LOOKUP('MatRoster'!C7,{7,730,8,830,9,13,1 330,1430,17,2115,2130,2230,2245},{"AM","AM","AM"," AM","AM","PM","PM","PM","PM","ND","ND","ND","ND"}) ,0)

7 Returns AM
730 Returns PM should be AM
8 Returns AM
830 Returns PM should be PM
9 Returns AM
13 Returns PM
1330 Returns PM
1430 Returns PM
17 Returns PM
2115 Returns PM
2130 Returns ND
2230 Returns ND
2245 Returns ND

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
Unexpected Result Hardeep_kanwar[_2_] Excel Worksheet Functions 2 January 16th 09 03:29 PM
sumproduct with boolean criteria returns unexpected 0 goss[_2_] Excel Discussion (Misc queries) 6 October 28th 07 04:33 PM
FV Function result is unexpected. RushatiINDIA Excel Worksheet Functions 8 February 28th 07 03:13 AM
vlookup based on random result returns incorrect result rickat Excel Worksheet Functions 1 December 6th 05 01:16 PM
Unexpected result Biff Excel Worksheet Functions 5 June 3rd 05 02:56 AM


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