Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mike K
 
Posts: n/a
Default Lookup function still not working correctly

Oh wise ones,
I thought I had it, I really thought I had it this
time. Ok, so I have my data as follows;

B2 =Today() which as of right now is Sunday
E2 =Lookup(Text(B2,"ddddd"),C7:I7,C8:I8) vector based
C7:I7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
C8:I8 C A A C C A A

If B2 is "Sunday" and I7 contains "Sunday", should'nt E2 return "A" from I8?
Why is it returning "C"?

The equation builder shows "Sunday" for the lookup value. So I'm not sure
whats wrong. I know B2 is really a whole number, but I thought the "TEXT"
function in E2 was accounting for that. Please advise

Thanks, Mike
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Hey, I remember this!

I don't know why that is happening!

If you try this:

=TEXT(B2,"ddddd")=I7

It returns TRUE which means the lookup value matches SUNDAY in I7. ???

Here's a different formula:

=INDEX(C7:I7,MATCH(TEXT(B2,"ddddd"),C7:I7,0))

Biff

"Mike K" wrote in message
...
Oh wise ones,
I thought I had it, I really thought I had it this
time. Ok, so I have my data as follows;

B2 =Today() which as of right now is Sunday
E2 =Lookup(Text(B2,"ddddd"),C7:I7,C8:I8) vector based
C7:I7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
C8:I8 C A A C C A A

If B2 is "Sunday" and I7 contains "Sunday", should'nt E2 return "A" from
I8?
Why is it returning "C"?

The equation builder shows "Sunday" for the lookup value. So I'm not sure
whats wrong. I know B2 is really a whole number, but I thought the "TEXT"
function in E2 was accounting for that. Please advise

Thanks, Mike



  #3   Report Post  
Biff
 
Posts: n/a
Default

Ooops!

The new formula should be:

=INDEX(C8:I8,MATCH(TEXT(B2,"ddddd"),C7:I7,0))

Biff

"Biff" wrote in message
...
Hi!

Hey, I remember this!

I don't know why that is happening!

If you try this:

=TEXT(B2,"ddddd")=I7

It returns TRUE which means the lookup value matches SUNDAY in I7. ???

Here's a different formula:

=INDEX(C7:I7,MATCH(TEXT(B2,"ddddd"),C7:I7,0))

Biff

"Mike K" wrote in message
...
Oh wise ones,
I thought I had it, I really thought I had it this
time. Ok, so I have my data as follows;

B2 =Today() which as of right now is Sunday
E2 =Lookup(Text(B2,"ddddd"),C7:I7,C8:I8) vector based
C7:I7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
C8:I8 C A A C C A A

If B2 is "Sunday" and I7 contains "Sunday", should'nt E2 return "A" from
I8?
Why is it returning "C"?

The equation builder shows "Sunday" for the lookup value. So I'm not sure
whats wrong. I know B2 is really a whole number, but I thought the "TEXT"
function in E2 was accounting for that. Please advise

Thanks, Mike





  #4   Report Post  
Rowan
 
Posts: n/a
Default

I can't say why this isn't working for you, it seems ok to me. How about
trying:

=HLOOKUP(TEXT(B2,"ddddd"),C7:I8,2,0)

Hope this helps
Rowan

"Mike K" wrote:

Oh wise ones,
I thought I had it, I really thought I had it this
time. Ok, so I have my data as follows;

B2 =Today() which as of right now is Sunday
E2 =Lookup(Text(B2,"ddddd"),C7:I7,C8:I8) vector based
C7:I7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
C8:I8 C A A C C A A

If B2 is "Sunday" and I7 contains "Sunday", should'nt E2 return "A" from I8?
Why is it returning "C"?

The equation builder shows "Sunday" for the lookup value. So I'm not sure
whats wrong. I know B2 is really a whole number, but I thought the "TEXT"
function in E2 was accounting for that. Please advise

Thanks, Mike

  #5   Report Post  
Biff
 
Posts: n/a
Default

Another alternative:

=HLOOKUP(TEXT(B2,"ddddd"),C7:I8,2,0)

Biff

"Biff" wrote in message
...
Hi!

Hey, I remember this!

I don't know why that is happening!

If you try this:

=TEXT(B2,"ddddd")=I7

It returns TRUE which means the lookup value matches SUNDAY in I7. ???

Here's a different formula:

=INDEX(C7:I7,MATCH(TEXT(B2,"ddddd"),C7:I7,0))

Biff

"Mike K" wrote in message
...
Oh wise ones,
I thought I had it, I really thought I had it this
time. Ok, so I have my data as follows;

B2 =Today() which as of right now is Sunday
E2 =Lookup(Text(B2,"ddddd"),C7:I7,C8:I8) vector based
C7:I7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
C8:I8 C A A C C A A

If B2 is "Sunday" and I7 contains "Sunday", should'nt E2 return "A" from
I8?
Why is it returning "C"?

The equation builder shows "Sunday" for the lookup value. So I'm not sure
whats wrong. I know B2 is really a whole number, but I thought the "TEXT"
function in E2 was accounting for that. Please advise

Thanks, Mike







  #6   Report Post  
Mike K
 
Posts: n/a
Default

Thanks Biff, Rowan.

I got them both to work correctly.

Thanks again,
Mike

"Biff" wrote:

Another alternative:

=HLOOKUP(TEXT(B2,"ddddd"),C7:I8,2,0)

Biff

"Biff" wrote in message
...
Hi!

Hey, I remember this!

I don't know why that is happening!

If you try this:

=TEXT(B2,"ddddd")=I7

It returns TRUE which means the lookup value matches SUNDAY in I7. ???

Here's a different formula:

=INDEX(C7:I7,MATCH(TEXT(B2,"ddddd"),C7:I7,0))

Biff

"Mike K" wrote in message
...
Oh wise ones,
I thought I had it, I really thought I had it this
time. Ok, so I have my data as follows;

B2 =Today() which as of right now is Sunday
E2 =Lookup(Text(B2,"ddddd"),C7:I7,C8:I8) vector based
C7:I7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
C8:I8 C A A C C A A

If B2 is "Sunday" and I7 contains "Sunday", should'nt E2 return "A" from
I8?
Why is it returning "C"?

The equation builder shows "Sunday" for the lookup value. So I'm not sure
whats wrong. I know B2 is really a whole number, but I thought the "TEXT"
function in E2 was accounting for that. Please advise

Thanks, Mike






  #7   Report Post  
Biff
 
Posts: n/a
Default

You're welcome. Thanks for the feedback!

Biff

"Mike K" wrote in message
...
Thanks Biff, Rowan.

I got them both to work correctly.

Thanks again,
Mike

"Biff" wrote:

Another alternative:

=HLOOKUP(TEXT(B2,"ddddd"),C7:I8,2,0)

Biff

"Biff" wrote in message
...
Hi!

Hey, I remember this!

I don't know why that is happening!

If you try this:

=TEXT(B2,"ddddd")=I7

It returns TRUE which means the lookup value matches SUNDAY in I7. ???

Here's a different formula:

=INDEX(C7:I7,MATCH(TEXT(B2,"ddddd"),C7:I7,0))

Biff

"Mike K" wrote in message
...
Oh wise ones,
I thought I had it, I really thought I had it this
time. Ok, so I have my data as follows;

B2 =Today() which as of right now is Sunday
E2 =Lookup(Text(B2,"ddddd"),C7:I7,C8:I8) vector based
C7:I7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
C8:I8 C A A C C A A

If B2 is "Sunday" and I7 contains "Sunday", should'nt E2 return "A"
from
I8?
Why is it returning "C"?

The equation builder shows "Sunday" for the lookup value. So I'm not
sure
whats wrong. I know B2 is really a whole number, but I thought the
"TEXT"
function in E2 was accounting for that. Please advise

Thanks, Mike







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
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
Lookup function returning reference, not value Caligula Excel Worksheet Functions 1 May 28th 05 06:35 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
Vlookup & Lookup function error Beginner Excel Worksheet Functions 9 January 11th 05 12:37 AM
Vector lookup function GregTh Excel Worksheet Functions 1 November 4th 04 08:34 PM


All times are GMT +1. The time now is 06:45 PM.

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"