Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Wrong output returned during IF function

I currently have

=IF(O2="","",(VLOOKUP(O2,risk_impacts!B2:BV95,72,F ALSE)))

Which is returning the correct value of

14

In a different cell I have the following formula based on the value of the
above cell.

=IF(M5<=3,"Green",IF(M5=20,"RED","AMBER"))

Yet the outcome is showing as "RED" when it's clearly "AMBER".

This was in response of conditional formatting not working. As I'm using
2007 I can place 3 separate formatting options on the one cell and yet it was
still not working and was showing always as red.

PLEASE HELP
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default Wrong output returned during IF function

Hi,

Make sure the VLOOKUP's return value, 14, is really a number, not text.

If it is text then change the formula to read:

=IF(--M5<=3,"Green",IF(--M5=20,"RED","AMBER"))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"jb333" wrote:

I currently have

=IF(O2="","",(VLOOKUP(O2,risk_impacts!B2:BV95,72,F ALSE)))

Which is returning the correct value of

14

In a different cell I have the following formula based on the value of the
above cell.

=IF(M5<=3,"Green",IF(M5=20,"RED","AMBER"))

Yet the outcome is showing as "RED" when it's clearly "AMBER".

This was in response of conditional formatting not working. As I'm using
2007 I can place 3 separate formatting options on the one cell and yet it was
still not working and was showing always as red.

PLEASE HELP

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Wrong output returned during IF function

Thanks!

"Shane Devenshire" wrote:

Hi,

Make sure the VLOOKUP's return value, 14, is really a number, not text.

If it is text then change the formula to read:

=IF(--M5<=3,"Green",IF(--M5=20,"RED","AMBER"))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"jb333" wrote:

I currently have

=IF(O2="","",(VLOOKUP(O2,risk_impacts!B2:BV95,72,F ALSE)))

Which is returning the correct value of

14

In a different cell I have the following formula based on the value of the
above cell.

=IF(M5<=3,"Green",IF(M5=20,"RED","AMBER"))

Yet the outcome is showing as "RED" when it's clearly "AMBER".

This was in response of conditional formatting not working. As I'm using
2007 I can place 3 separate formatting options on the one cell and yet it was
still not working and was showing always as red.

PLEASE HELP

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Wrong output returned during IF function

The 14 is a TEXT number which is not the same as a NUMERIC number. It may be
formatted as TEXT in your lookup table or there might be unseen characters
like spaces making it a text value: <space14

A TEXT value will *always* evaluate to be greater than any numeric number.

So you're getting: TEXT=20 = TRUE.

The best thing to do is to fix this problem at the source which sounds like
the data in your lookup table. Here's one way to convert text numbers into
numeric numbers:

Select an empty cell. It can be any empty cell.
Copy that empty cell: EditCopy
Select the text numbers to be converted
Then do: EditPaste SpecialAddOK

--
Biff
Microsoft Excel MVP


"jb333" wrote in message
...
I currently have

=IF(O2="","",(VLOOKUP(O2,risk_impacts!B2:BV95,72,F ALSE)))

Which is returning the correct value of

14

In a different cell I have the following formula based on the value of the
above cell.

=IF(M5<=3,"Green",IF(M5=20,"RED","AMBER"))

Yet the outcome is showing as "RED" when it's clearly "AMBER".

This was in response of conditional formatting not working. As I'm using
2007 I can place 3 separate formatting options on the one cell and yet it
was
still not working and was showing always as red.

PLEASE HELP



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
Help with Averages/Sums of values returned from IF function TheBigUnit622 Excel Discussion (Misc queries) 7 March 3rd 09 05:38 PM
How do I set a minimum value to be returned from IF function KW Excel Discussion (Misc queries) 1 June 27th 07 04:14 PM
Querying a range returned by another function Bill Steamshove Excel Worksheet Functions 2 April 9th 06 04:56 PM
Format numbers returned in the function CONCATENATE Kip Excel Discussion (Misc queries) 3 April 5th 06 06:59 PM
Using the returned value of a function adombrowski New Users to Excel 1 December 21st 05 07:01 AM


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