Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default adding result of "if" statement..

I have created this "if" statement.
=IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0",
IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0", IF(G17=(""),""
)))))))

Now i want to add the result of this statement from consecutive rows.
i did sum on the results but i am not able to add the results of my
statements.

can you tell me how i can add the results of this statement?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default adding result of "if" statement..

Try it like this

=IF(G17=(166719),1, IF(G17=(165852),2, IF(G17=(165851),0,
IF(G17=(166718),1, IF(G17=(166685),4, IF(G17=(166745),0, IF(G17=(""),""
)))))))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Xiamen" wrote:

I have created this "if" statement.
=IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0",
IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0", IF(G17=(""),""
)))))))

Now i want to add the result of this statement from consecutive rows.
i did sum on the results but i am not able to add the results of my
statements.

can you tell me how i can add the results of this statement?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default adding result of "if" statement..

And you don't need all the parentheses. And you should have something to say
what you want if none of the tests are true. If you're happy with 0 in this
case, use:

=IF(G17="","",IF(OR(G17=166718,G17=166719),1,IF(G1 7=16582,2,IF(G17=166685,4,0))))

Regards,
Fred

"Mike H" wrote in message
...
Try it like this

=IF(G17=(166719),1, IF(G17=(165852),2, IF(G17=(165851),0,
IF(G17=(166718),1, IF(G17=(166685),4, IF(G17=(166745),0, IF(G17=(""),""
)))))))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Xiamen" wrote:

I have created this "if" statement.
=IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0",
IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0",
IF(G17=(""),""
)))))))

Now i want to add the result of this statement from consecutive rows.
i did sum on the results but i am not able to add the results of my
statements.

can you tell me how i can add the results of this statement?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default adding result of "if" statement..

On Mar 24, 5:40*pm, "Fred Smith" wrote:
And you don't need all the parentheses. And you should have something to say
what you want if none of the tests are true. If you're happy with 0 in this
case, use:

=IF(G17="","",IF(OR(G17=166718,G17=166719),1,IF(G1 7=16582,2,IF(G17=166685,4*,0))))

Regards,
Fred

"Mike H" wrote in message

...



Try it like this


=IF(G17=(166719),1, IF(G17=(165852),2, IF(G17=(165851),0,
IF(G17=(166718),1, IF(G17=(166685),4, IF(G17=(166745),0, IF(G17=(""),""
)))))))
--
Mike


When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Xiamen" wrote:


I have created this "if" statement.
=IF(G17=(166719),"1", IF(G17=(165852),"2", IF(G17=(165851),"0",
IF(G17=(166718),"1", IF(G17=(166685),"4", IF(G17=(166745),"0",
IF(G17=(""),""
)))))))


Now i want to add the result of this statement from consecutive rows.
i did sum on the results but i am not able to add the results of my
statements.


can you tell me how i can add the results of this statement?- Hide quoted text -


- Show quoted text -


I might consider controlling the cell with an Index/Match from a table.
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
Adding a row immediately following a "true" statement Robb Excel Discussion (Misc queries) 1 January 9th 10 08:23 PM
Formula Result is "V6", need Excel to use cell "V6", not the resul Erik Excel Worksheet Functions 3 September 5th 08 03:10 PM
Adding values generated by "IF" Statement Terregles99 Excel Discussion (Misc queries) 3 July 24th 08 09:49 PM
Unexpected Result with "If" Logic/Conditional Statement joeu2004 Excel Discussion (Misc queries) 1 July 5th 07 04:40 PM
Unexpected Result with "If" Logic/Conditional Statement Bill Ridgeway Excel Discussion (Misc queries) 1 July 3rd 07 07:07 PM


All times are GMT +1. The time now is 08:25 AM.

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"