Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default If..else..then statement

I'm trying to write this compare statement, but I keep getting errors about
to many arguements:

In Cell C20
IF C10=0, then C15
ElseIF C15=0, then C10
ElseIF C15=0 and C10=0
then
Average(C10,C15)
Else 0

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If..else..then statement

Jeff,

table for all the possible commbinations of C10 & c15 looks like this

c10 c15 answer
1 0 0.5
0 1 0.5
0 0 0
1 1 1

From your description I belive the answer in each case is as indicated above
so

=average(c10,c15)

should work

Mike

"Jeff Metcalf" wrote:

I'm trying to write this compare statement, but I keep getting errors about
to many arguements:

In Cell C20
IF C10=0, then C15
ElseIF C15=0, then C10
ElseIF C15=0 and C10=0
then
Average(C10,C15)
Else 0

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If..else..then statement

Hi,

I should have added that if this is wrong please put the answers you expect
in each case.

Mike

"Mike H" wrote:

Jeff,

table for all the possible commbinations of C10 & c15 looks like this

c10 c15 answer
1 0 0.5
0 1 0.5
0 0 0
1 1 1

From your description I belive the answer in each case is as indicated above
so

=average(c10,c15)

should work

Mike

"Jeff Metcalf" wrote:

I'm trying to write this compare statement, but I keep getting errors about
to many arguements:

In Cell C20
IF C10=0, then C15
ElseIF C15=0, then C10
ElseIF C15=0 and C10=0
then
Average(C10,C15)
Else 0

Thanks in advance

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default If..else..then statement

Sorry, this is what I what....

c10 c15 answer
1 0 1
0 1 1
0 0 0
1 1 1
5 2 3.5

Thanks



"Mike H" wrote:

Hi,

I should have added that if this is wrong please put the answers you expect
in each case.

Mike

"Mike H" wrote:

Jeff,

table for all the possible commbinations of C10 & c15 looks like this

c10 c15 answer
1 0 0.5
0 1 0.5
0 0 0
1 1 1

From your description I belive the answer in each case is as indicated above
so

=average(c10,c15)

should work

Mike

"Jeff Metcalf" wrote:

I'm trying to write this compare statement, but I keep getting errors about
to many arguements:

In Cell C20
IF C10=0, then C15
ElseIF C15=0, then C10
ElseIF C15=0 and C10=0
then
Average(C10,C15)
Else 0

Thanks in advance

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If..else..then statement

I'm confused about averaging 2 zero cells and why you started a new thread
but try this

=IF(C10=0,C15,IF(C15=0,C10,AVERAGE(C10,C15)))

Mike


"Jeff Metcalf" wrote:

Sorry, this is what I what....

c10 c15 answer
1 0 1
0 1 1
0 0 0
1 1 1
5 2 3.5

Thanks



"Mike H" wrote:

Hi,

I should have added that if this is wrong please put the answers you expect
in each case.

Mike

"Mike H" wrote:

Jeff,

table for all the possible commbinations of C10 & c15 looks like this

c10 c15 answer
1 0 0.5
0 1 0.5
0 0 0
1 1 1

From your description I belive the answer in each case is as indicated above
so

=average(c10,c15)

should work

Mike

"Jeff Metcalf" wrote:

I'm trying to write this compare statement, but I keep getting errors about
to many arguements:

In Cell C20
IF C10=0, then C15
ElseIF C15=0, then C10
ElseIF C15=0 and C10=0
then
Average(C10,C15)
Else 0

Thanks in advance



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default If..else..then statement

I didn't start 2 threads...I don't know how that happened.

I'm not trying to average 2 zero cells really...I just want it to show 0 if
the corresponding cells are both 0.

The sheet calculates profit margin from 2 different areas of work. So if
they salesperson only has things in the 'write in' area, then I only want to
show that margin percentage. If he only has items in the DB connected area,
then I only want it to show that margin. But if he has items in both areas,
then I need the profit margin calculated from both.

Maybe I'm going about this wrong?

"Mike H" wrote:

I'm confused about averaging 2 zero cells and why you started a new thread
but try this

=IF(C10=0,C15,IF(C15=0,C10,AVERAGE(C10,C15)))

Mike


"Jeff Metcalf" wrote:

Sorry, this is what I what....

c10 c15 answer
1 0 1
0 1 1
0 0 0
1 1 1
5 2 3.5

Thanks



"Mike H" wrote:

Hi,

I should have added that if this is wrong please put the answers you expect
in each case.

Mike

"Mike H" wrote:

Jeff,

table for all the possible commbinations of C10 & c15 looks like this

c10 c15 answer
1 0 0.5
0 1 0.5
0 0 0
1 1 1

From your description I belive the answer in each case is as indicated above
so

=average(c10,c15)

should work

Mike

"Jeff Metcalf" wrote:

I'm trying to write this compare statement, but I keep getting errors about
to many arguements:

In Cell C20
IF C10=0, then C15
ElseIF C15=0, then C10
ElseIF C15=0 and C10=0
then
Average(C10,C15)
Else 0

Thanks in advance

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
If ABS statement maijiuli Excel Worksheet Functions 3 November 20th 07 09:15 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"