Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
izzie
 
Posts: n/a
Default Excel If Statements, please help!


I've been trying to make multiple IF statements but it says that I have
too many arguements. The problem is, I need to have a calculation for
my work.

Here's what I need to be done

For example:

If G7 is changed, then M7 needs to change to what G7 is times 0.5

Then, if G10 is changed M7 also needs to be changed. However, if M7 is
greater that zero this equation needs to be done M7+G7-M7*G7
If M7 is less than zero, this equation needs to be done M7+G7+M7*G7

Then, if G11 is changed, M7 also needs to be changed and the same rules
above apply.

Can anyone help me to do this please? I've been trying for ages and I
can't find a solution.

Many thanks

Izzie


--
izzie
------------------------------------------------------------------------
izzie's Profile: http://www.excelforum.com/member.php...o&userid=29491
View this thread: http://www.excelforum.com/showthread...hreadid=491912

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Excel If Statements, please help!

I may be just being dim, but I think you'll have to provide more
information.

It sounds like your first example should just be to put

=G7/2

in M7. You then say the if G10 is changed, M7 needs to be changed, too,
but you describe a formula that uses M7 - so what exactly are you
wanting to be changed when G10 changes? To change M7, say, to

=M7+G7-M7*G7

you'll need to use an event macro (formulas can't change other formulas)
and you'll get a circular reference as well.

If you instead mean that G10 should change if M7 changes, you could use

G10: =M7+G7-G7*ABS(M7)

which, since M7 is just G7/2 means that you could use the equivalent:

G10: =G7*(1.5-ABS(G7/2))






In article ,
izzie wrote:

I've been trying to make multiple IF statements but it says that I have
too many arguements. The problem is, I need to have a calculation for
my work.

Here's what I need to be done

For example:

If G7 is changed, then M7 needs to change to what G7 is times 0.5

Then, if G10 is changed M7 also needs to be changed. However, if M7 is
greater that zero this equation needs to be done M7+G7-M7*G7
If M7 is less than zero, this equation needs to be done M7+G7+M7*G7

Then, if G11 is changed, M7 also needs to be changed and the same rules
above apply.

Can anyone help me to do this please? I've been trying for ages and I
can't find a solution.

Many thanks

Izzie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
izzie
 
Posts: n/a
Default Excel If Statements, please help!


JE McGimpsey Wrote:
I may be just being dim, but I think you'll have to provide more
information.

It sounds like your first example should just be to put

=G7/2

in M7. You then say the if G10 is changed, M7 needs to be changed,
too,
but you describe a formula that uses M7 - so what exactly are you
wanting to be changed when G10 changes? To change M7, say, to

=M7+G7-M7*G7

you'll need to use an event macro (formulas can't change other
formulas)
and you'll get a circular reference as well.

If you instead mean that G10 should change if M7 changes, you could
use

G10: =M7+G7-G7*ABS(M7)

which, since M7 is just G7/2 means that you could use the equivalent:

G10: =G7*(1.5-ABS(G7/2))





Yeah, sorry, I didn't explain myself properly. I do need M7 to change
once the other fields have been updated according to that equation. How
do I use an event macro?

Originally, what I did was this:

=IF(G100, M7+G10-M7*G10, M7+G10+M7*G10, IF(G110, M7+G11-M7*G11,
M7+G11+M7*G11, G7*0.5))

and it said I had to many arguments.


--
izzie
------------------------------------------------------------------------
izzie's Profile: http://www.excelforum.com/member.php...o&userid=29491
View this thread: http://www.excelforum.com/showthread...hreadid=491912

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Excel If Statements, please help!

I'm still not clear on what you're trying to accomplish.

What cell do you want this to go into? If M7, then do you really want
circular references if G10 or G11 <0?

What should happen if *both* G10 and G11 are <0?

The IF() function has the form

=IF(condition, TRUE branch, FALSE branch)

i.e., in =IF(G100, ..., ...), G10 is either 0 or it's not. Adding the
additional terms is why you got the error.


In article ,
izzie wrote:

Yeah, sorry, I didn't explain myself properly. I do need M7 to change
once the other fields have been updated according to that equation. How
do I use an event macro?

Originally, what I did was this:

=IF(G100, M7+G10-M7*G10, M7+G10+M7*G10, IF(G110, M7+G11-M7*G11,
M7+G11+M7*G11, G7*0.5))

and it said I had to many arguments.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JR
 
Posts: n/a
Default Excel If Statements, please help!

You could still if statements, just use more cells so you don't get a
circular reference. It sounds like M7 could always be G7*1.5. In M8, put in
If(M70,M7," "), then have G10 refer to M8 and G11 refer to M9, etc.

"izzie" wrote:


I've been trying to make multiple IF statements but it says that I have
too many arguements. The problem is, I need to have a calculation for
my work.

Here's what I need to be done

For example:

If G7 is changed, then M7 needs to change to what G7 is times 0.5

Then, if G10 is changed M7 also needs to be changed. However, if M7 is
greater that zero this equation needs to be done M7+G7-M7*G7
If M7 is less than zero, this equation needs to be done M7+G7+M7*G7

Then, if G11 is changed, M7 also needs to be changed and the same rules
above apply.

Can anyone help me to do this please? I've been trying for ages and I
can't find a solution.

Many thanks

Izzie


--
izzie
------------------------------------------------------------------------
izzie's Profile: http://www.excelforum.com/member.php...o&userid=29491
View this thread: http://www.excelforum.com/showthread...hreadid=491912


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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Microsoft Excel in Microsoft works - how to open R J Gavin Excel Discussion (Misc queries) 3 September 16th 05 08:29 PM
excel 4.0 macro removal tool Sachin Shah Excel Discussion (Misc queries) 0 August 25th 05 04:17 AM
Value Errors with EXCEL XP not showing up in EXCEL 2000 goodguy Links and Linking in Excel 0 July 19th 05 02:38 PM
VBA for Excel 2000 file is corrupt nkamp Excel Discussion (Misc queries) 0 May 26th 05 03:37 PM


All times are GMT +1. The time now is 01:22 AM.

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"