Aaron
Member
Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
|
Right,
Can someone explain exactly what this following statement is doing (in words....and preferably English)?
=IF(J2>0,(H6*(J2/100)+(H6+H2)-H24),H26)

My understanding of it is (and i think i'm wrong):
It checks to see if Cell J2 is of a greater value then 0. If this is the case, it multiplys the value of H6 by the value of Cell J2 divided by 100 plus the value of Cell H6 + the value of Cell H2....fook knows what happens after this
|
Mark Prydderch
Member
Registered: 7th Mar 07
Location: Chester
User status: Offline
|
...minus the value of h24. If this is not the case show the value of H26
...I think.
|
Aaron
Member
Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
|
Yeah i think you're right I just needed that nudge to make me see it too 
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
If J2 is greater than 0, the answer returned will be Cell H6 multiplied by the value of J2 divided by 100, plus the value of H6 and H2 added, minus the value of H24.
If J2 less than or equal to zero, the value of H26 will be returned.
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
It's all about BODMAS:
Brackets first, Then Powers (squared, cubed etc), then do the maths in this order:
Divide then Multiply > Addition > Subtract
|
Aaron
Member
Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
|
Yup, my head almost exploded when i had to re-write it to work with a spreadsheet of my own last night. Its to work out a percentage of a number...then add the answer to another number I also had to do it in reverse and make it subtract.
Either way...its working now
|