Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bell
 
Posts: n/a
Default Problems with an If function

Hi,

does anyone know what is wrong with the following if statement?

=IF(C2BL2;(C2-BL2)*BX2+BR2*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,I F(C2BK2;(C2-BR2)*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BJ2 ;(C2-BQ2)*BV2+BP2*BU2+BO2*BT2+BN2*BS2,
IF(C2BI2;(C2-BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BH2;(C2-BO2)*BT2+BN2*BS2;C2*BN2)

What I'm trying to do is make Excel do calculations based on depending on
the value in cell C2 in this case. As far as I know it should be possible to
use several IFs like =IF(A=1;Green, IF(A=2,Red, IF(A=3, Blue))) or is there
another function that is more suitable for these calculations?

Best regards Bell
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Well to start you are using both , and ; as delimiters. It should be one or
the other.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bell" wrote in message
...
Hi,

does anyone know what is wrong with the following if statement?


=IF(C2BL2;(C2-BL2)*BX2+BR2*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,I F(C2BK2;(C
2-BR2)*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BJ2 ;(C2-BQ2)*BV2+BP2*BU2+BO
2*BT2+BN2*BS2,

IF(C2BI2;(C2-BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BH2;(C2-BO2)*BT2+BN2*BS2;C2*BN2)

What I'm trying to do is make Excel do calculations based on depending on
the value in cell C2 in this case. As far as I know it should be possible

to
use several IFs like =IF(A=1;Green, IF(A=2,Red, IF(A=3, Blue))) or is

there
another function that is more suitable for these calculations?

Best regards Bell



  #3   Report Post  
Richard Buttrey
 
Posts: n/a
Default

On Fri, 14 Oct 2005 06:19:03 -0700, "Bell"
wrote:

Hi,

does anyone know what is wrong with the following if statement?

=IF(C2BL2;(C2-BL2)*BX2+BR2*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,I F(C2BK2;(C2-BR2)*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BJ2 ;(C2-BQ2)*BV2+BP2*BU2+BO2*BT2+BN2*BS2,
IF(C2BI2;(C2-BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BH2;(C2-BO2)*BT2+BN2*BS2;C2*BN2)

What I'm trying to do is make Excel do calculations based on depending on
the value in cell C2 in this case. As far as I know it should be possible to
use several IFs like =IF(A=1;Green, IF(A=2,Red, IF(A=3, Blue))) or is there
another function that is more suitable for these calculations?

Best regards Bell


You can nest up to 7 IF statements. It appears you've got 4 which is
OK, but I'd expect there to be four ")" at the end rather than just
one.

HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #4   Report Post  
Bell
 
Posts: n/a
Default

For what I know ; are used as delimiters between criteria, truepart and
falsepart whereas , are used for "starting" an additional if statement.

Am I wrong?

"Bob Phillips" skrev:

Well to start you are using both , and ; as delimiters. It should be one or
the other.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bell" wrote in message
...
Hi,

does anyone know what is wrong with the following if statement?


=IF(C2BL2;(C2-BL2)*BX2+BR2*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,I F(C2BK2;(C
2-BR2)*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BJ2 ;(C2-BQ2)*BV2+BP2*BU2+BO
2*BT2+BN2*BS2,

IF(C2BI2;(C2-BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BH2;(C2-BO2)*BT2+BN2*BS2;C2*BN2)

What I'm trying to do is make Excel do calculations based on depending on
the value in cell C2 in this case. As far as I know it should be possible

to
use several IFs like =IF(A=1;Green, IF(A=2,Red, IF(A=3, Blue))) or is

there
another function that is more suitable for these calculations?

Best regards Bell




  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

I think so. AFAIK, they are the same. The difference comes between
continental versions of Excel and the rest.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bell" wrote in message
...
For what I know ; are used as delimiters between criteria, truepart and
falsepart whereas , are used for "starting" an additional if statement.

Am I wrong?

"Bob Phillips" skrev:

Well to start you are using both , and ; as delimiters. It should be one

or
the other.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bell" wrote in message
...
Hi,

does anyone know what is wrong with the following if statement?



=IF(C2BL2;(C2-BL2)*BX2+BR2*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,I F(C2BK2;(C

2-BR2)*BW2+BQ2*BV2+BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BJ2 ;(C2-BQ2)*BV2+BP2*BU2+BO
2*BT2+BN2*BS2,


IF(C2BI2;(C2-BP2*BU2+BO2*BT2+BN2*BS2,IF(C2BH2;(C2-BO2)*BT2+BN2*BS2;C2*BN2)

What I'm trying to do is make Excel do calculations based on depending

on
the value in cell C2 in this case. As far as I know it should be

possible
to
use several IFs like =IF(A=1;Green, IF(A=2,Red, IF(A=3, Blue))) or is

there
another function that is more suitable for these calculations?

Best regards Bell






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
Linest function: data selection problems NathanG Excel Worksheet Functions 1 August 26th 05 04:12 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
opening up an english excel sheet onto a french verions - problems with edate function [email protected] Excel Discussion (Misc queries) 0 February 20th 05 01:37 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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