Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Need Help solving this equation

=IF((SUMIF(K25,"<0",K25))then(K25+P22+P21))*orIF(( SUMIF(K25,"0",K25))then(K25-(P22+P21)))

i am familiar with VBA a little... i understand the "or if" command is not in excel i just put it in so you guys could understand what i am trying to accomplish.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Need Help solving this equation

=IF((SUMIF(K25,"<0",K25))then(K25+P22+P21))*orIF(( SUMIF(K25,"0",K25))then(K25-(P22+P21)))

i am familiar with VBA a little... i understand the "or if" command
is not in excel i just put it in so you guys could understand what i
am trying to accomplish.


Firstly, this is *not* VBA!

Secondly, you can use the OR() function in cell formulas. Look it up
and see what it does and how it works.

Thirdly, I can't give you a sample formula because I can't make sense
of this example's use of the SUMIF() function. If using XL2007 or later
perhaps the SUMIFS() function would better suit your needs!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 829
Default Need Help solving this equation

"DeerSpotter" wrote:
=IF((SUMIF(K25,"<0",K25))then(K25+P22+P21))
*orIF((SUMIF(K25,"0",K25))then(K25-(P22+P21)))

i understand the "or if" command is not in excel i just
put it in so you guys could understand what i am
trying to accomplish.


Does this do what you want?

=IF(K25<0, K25+P22+P21, K25-(P22+P21))

Note: You do not cover the case when K25=0. As written, my formula will
return -(P22+P21) in that case. If you to return P22+P21, change K25<0 to
K25<=0.

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
solving for a sum acp20770 Excel Worksheet Functions 1 December 14th 06 01:21 AM
solving of linear equation Stan Excel Discussion (Misc queries) 5 August 30th 06 03:12 PM
Please help me solving this equation ...: ) Joe Satriani Excel Discussion (Misc queries) 3 February 22nd 06 06:50 PM
Equation Editor- problem when editing an equation Gaby L. Excel Discussion (Misc queries) 0 September 27th 05 09:24 PM
Multi-variable Equation Solving Todd[_10_] Excel Programming 2 October 30th 03 11:41 PM


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