A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Setting up and Configuration
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can someone Decipher this Excell Formula for me ???



 
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2003, 09:39 AM
Andy Yeo
external usenet poster
 
Posts: n/a
Default 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  
Old October 4th, 2003, 11:28 PM
M. lane
external usenet poster
 
Posts: n/a
Default 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  
Old January 28th, 2004, 07:30 PM
Mark Henri
external usenet poster
 
Posts: n/a
Default 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  
Old January 29th, 2004, 05:04 PM
Mark Henri
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.