Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default IF function question

My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Formatting problem

Well, the formatting didn't stick so I guess the numbers don't make any
sense. There should be one number under each debit and credit. for a total of
six numbers in each row.
The first row should be 5, 0, 5, 0, 10, 0
The second row should be 0, 3, 7, 0, 4, 0
The third row should be 0, 3, 0, 7, 0, 10

"Dutilbug" wrote:

My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default IF function question

Hi,

You can try this
=IF(E11-F11+G11-H110,+E11-F11+G11,IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default IF function question

Thanks, but that is giving me the same answer in both cells. I need a zero in
one cell.

"Ashish Mathur" wrote:

Hi,

You can try this
=IF(E11-F11+G11-H110,+E11-F11+G11,IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default IF function question

Hi,

Your question is not very clear. Anyways, try this

=IF($E11-$F11+$G11-$H110,+$E11-$F11+$G11,IF($E11-$F11+$G11-$H11<0,-(+$E11-$F11+$G11-$H11),0))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Ashish Mathur" wrote in message
...
Hi,

You can try this
=IF(E11-F11+G11-H110,+E11-F11+G11,IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default IF function question

If your teacher is offering you bonus points, what is the point if we do it
for you?

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default IF function question

Well Bob, first, my teacher doesn't mind when we work with other people to
figure things out. I have helped a lot of people in my class with other
projects. Second, I would be happy with just being pointed in the right
direction. I want to understand the why of it, not just copy and paste a
formula and be done with it.

"Bob Phillips" wrote:

If your teacher is offering you bonus points, what is the point if we do it
for you?

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and the
other has to be zero. The formula in both I and J must be the same.




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default IF function question

Then just combine your formulae, with a nested IF

=IF(condition1, action1,IF(condition2, action2,action3))

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
Well Bob, first, my teacher doesn't mind when we work with other people to
figure things out. I have helped a lot of people in my class with other
projects. Second, I would be happy with just being pointed in the right
direction. I want to understand the why of it, not just copy and paste a
formula and be done with it.

"Bob Phillips" wrote:

If your teacher is offering you bonus points, what is the point if we do
it
for you?

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in
two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and
the
other has to be zero. The formula in both I and J must be the same.






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default IF function question

Thanks. I didn't mean to sound rude with my previous post, but I am an
excellent student and I work very hard. I have tried nesting. My problem is
that I need an answer to be either in cell I11 or J11, but not both. For the
first instance of my problem I have:
Cell E11 is $1,149.19
Cell F11 is $0.00
Cell G11 is $0.00
Cell H11 is $6,064.11
I need I11 to be $0.00
I need J11 to be $4,914.92

When I nest the formulas
=IF($E11-$F11+$G11-$H110,+$E11-$F11+$G11,IF($E11-$F11+$G11-$H11<0,-(+$E11-$F11+$G11-$H11),0))
it puts $4,914.92 in both I and J. I need $0 in I and $4,914.92 in J.
I have been told this is possible, but I keep hitting walls.

"Bob Phillips" wrote:

Then just combine your formulae, with a nested IF

=IF(condition1, action1,IF(condition2, action2,action3))

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
Well Bob, first, my teacher doesn't mind when we work with other people to
figure things out. I have helped a lot of people in my class with other
projects. Second, I would be happy with just being pointed in the right
direction. I want to understand the why of it, not just copy and paste a
formula and be done with it.

"Bob Phillips" wrote:

If your teacher is offering you bonus points, what is the point if we do
it
for you?

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula in
two
different cells to obtain different results. This is for an accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it and
the
other has to be zero. The formula in both I and J must be the same.






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default IF function question

The way to do it is to test for the column as well as whether the sum is
positive or negative using the AND function.

=IF(AND(COLUMN()=9,(sum)0),(sum),IF(AND(COLUMN()= 10,(sum)<0),-(sum),0))

that should transfer across well

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
Thanks. I didn't mean to sound rude with my previous post, but I am an
excellent student and I work very hard. I have tried nesting. My problem
is
that I need an answer to be either in cell I11 or J11, but not both. For
the
first instance of my problem I have:
Cell E11 is $1,149.19
Cell F11 is $0.00
Cell G11 is $0.00
Cell H11 is $6,064.11
I need I11 to be $0.00
I need J11 to be $4,914.92

When I nest the formulas
=IF($E11-$F11+$G11-$H110,+$E11-$F11+$G11,IF($E11-$F11+$G11-$H11<0,-(+$E11-$F11+$G11-$H11),0))
it puts $4,914.92 in both I and J. I need $0 in I and $4,914.92 in J.
I have been told this is possible, but I keep hitting walls.

"Bob Phillips" wrote:

Then just combine your formulae, with a nested IF

=IF(condition1, action1,IF(condition2, action2,action3))

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
Well Bob, first, my teacher doesn't mind when we work with other people
to
figure things out. I have helped a lot of people in my class with other
projects. Second, I would be happy with just being pointed in the right
direction. I want to understand the why of it, not just copy and paste
a
formula and be done with it.

"Bob Phillips" wrote:

If your teacher is offering you bonus points, what is the point if we
do
it
for you?

--
__________________________________
HTH

Bob

"Dutilbug" wrote in message
...
My teacher has offered bonus points if we can use the same formula
in
two
different cells to obtain different results. This is for an
accounting
worksheet with entries similar to:

Columns E&F Columns G&H Columns I&J
Debit Credit Debit Credit Debit Credit
5 0 5 0 10
0
0 3 7 0 4
0
0 3 0 7 0
10

My column I formula: =IF(E11-F11+G11-H110,+E11-F11+G11,0)
My column J formula: =IF(E11-F11+G11-H11<0,-(+E11-F11+G11-H11),0)

Only one of the I & J columns can have an amount above zero in it
and
the
other has to be zero. The formula in both I and J must be the same.








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 Function Question [email protected] Excel Worksheet Functions 1 January 23rd 08 05:31 PM
IF function question asg2307 Excel Worksheet Functions 4 January 19th 08 12:46 AM
IF Function question. Excel beginner Excel Worksheet Functions 6 August 9th 07 04:13 PM
IF Function question. Excel beginner Excel Worksheet Functions 0 August 8th 07 10:36 PM
Function question EG Excel Worksheet Functions 1 September 14th 06 07:22 PM


All times are GMT +1. The time now is 03:54 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"