If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Can someone Decipher this Excell Formula for me ???
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 please convert it to C for me ? Thanks |
#2
|
|||
|
|||
Can someone Decipher this Excell Formula for me ???
"Andy Yeo" wrote in message ... 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)))))))) This is a simple cell reference formula which can only be understood by looking at the worksheet from which it came. From what I see right off hand, there are 8 test's that this formula is told to perform in sequence; Test 1 is: IF(C19=G2,I2 IF the content in cell C19 is less than or equal to the content in cell G2, then post the content of cell I2 here (in the cell where you got this formula), otherwise, perform the next test and so on. Without looking at the entire sheet, it is highly unlikely you will be able to figure out what the worksheet or formula is written for because it performs several mathematical equations which can be used for just about anything. if possible can you please convert it to C for me ? Thanks |
#3
|
|||
|
|||
Can someone Decipher this Excell Formula for me ???
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 please convert it to C for me ? /* should be something like this--*/ /* declare all variable as double */ double result; if (C19=G2) { result = I2; } else if (C19=G4) { result = (C19-G2)*H3+I2; } else if (C19=G6; result = (C19-G4)*H5+I4; } else if (C19=G8) { result = (C19-G6)*H7+I6; } else if (C19=G10) { result = (C19-G8)*H9+I8; } else if (C19=G12) { result = (C19-G10)*H11+I10; } else if (C19=G14) { result = (C19-G12)*H13+I12 } else if (C19=G16) { result = (C19-G14)*H15+I14; } else { result = (C19-G16)*H17+I16; } |
#4
|
|||
|
|||
Can someone Decipher this Excell Formula for me ???
On looking at it, my solution isn't right but you get the idea. Note that
Excel only allow 7 nested if's. Mark |
Thread Tools | |
Display Modes | |
|
|