#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 460
Default if then statements

I am doing a math project due tomorrow and I have data from rolling two dice
fifty times. I have a left die and right die column. Trying to use
"if-then" statements to count different outcomes (i.e., product is over 20,
sum is 5, left die is odd, both dice are equal, etc) Any ideas how I can make
this work?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default if then statements

On Nov 25, 11:20 am, doug wrote:
I am doing a math project due tomorrow and I have data from rolling
two dice fifty times. I have a left die and right die column. Trying to use
"if-then" statements to count different outcomes (i.e., product is over 20,
sum is 5, left die is odd, both dice are equal, etc) Any ideas how I can
make this work?


Are you referring to the VBA IF statement or the Excel IF() function?

Assuming the latter, if your assignment requires that you use IF() for
the solution, array formulas are one way to do it. After typing the
formula, commit by pressing ctrl+shift+Enter instead of just Enter.
If you forget, select the cell, press F2, then press ctrl+shift
+Enter. For example:

=sum(if(L1:L50*R1:R5020, 1, 0))

Remember to press ctrl+shift+Enter.

Alternatively, you can avoid array formulas with the following:

=sumproduct(--(L1:L50*R1:R5020))

Remember to press just Enter.
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 statements Tredown Excel Worksheet Functions 2 June 6th 07 12:51 PM
If And statements -- HELP! GI JOE Excel Worksheet Functions 8 March 15th 07 12:58 PM
If then statements Clay Excel Discussion (Misc queries) 2 March 13th 07 06:41 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if statements tom Excel Discussion (Misc queries) 3 November 18th 05 09:32 AM


All times are GMT +1. The time now is 09:59 PM.

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"