Can someone decipher this excell formula for me please?

A

Andy Yeo

IF(C19<=G2,I2,IF(C19<=G4,(C19-G2)*H3+I2,IF(C19<=G6,(C19-G4)
*H5+I4,IF(C19<=G8,(C19-G6)*H7+I6,IF(C19<=G10,(C19-G8)
*H9+I8,IF(C19<=G12,(C19-G10)*H11+I10,IF(C19<=G14,(C19-G12)
*H13+I12,IF(C19<=G16,(C19-G14)*H15+I14,(C19-G16)
*H17+I16))))))))


if possible can you convert it to C for me please ???

thanks !!!
 
B

Bob Buckland ?:-\)

Hi Andy,

It's a nested IF statement. Basically, the format
is IF(X=true, then do/return Y, else do/return Z). In this case
another if statement is in the 'z' position to
create an 'else if'/case condition to do additional
tests.

It may be clearer if presented like this

IF X , THEN Y
========== =======
IF(C19<=G2,I2,
[else] IF(C19<=G4,(C19-G2)*H3+I2,
[else] IF(C19<=G6,(C19-G4)*H5+I4,
[else IF(C19<=G8,(C19-G6)*H7+I6,
[else] IF(C19<=G10,(C19-G8)*H9+I8,
[else] IF(C19<=G12,(C19-G10)*H11+I10,
[else] IF(C19<=G14,(C19-G12)*H13+I12,
[else] IF(C19<=G16,(C19-G14)*H15+I14, [else] (C19-G16)*H17+I16)

==========
IF(C19<=G2,I2,IF(C19<=G4,(C19-G2)*H3+I2,IF(C19<=G6,(C19-G4)
*H5+I4,IF(C19<=G8,(C19-G6)*H7+I6,IF(C19<=G10,(C19-G8)
*H9+I8,IF(C19<=G12,(C19-G10)*H11+I10,IF(C19<=G14,(C19-G12)
*H13+I12,IF(C19<=G16,(C19-G14)*H15+I14,(C19-G16)
*H17+I16))))))))


if possible can you convert it to C for me please ???

thanks !!! >>
--
I hope this helps you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

The Office 2003 System parts explained
http://microsoft.com/uk/office/preview/system.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top