Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 829
Default Nested if then statement

"Travelgirl333" wrote:
I want to create a formula that has multiple criteria. For example if
cell B2 falls between 0-25% is cell C2 70% or greater. If yes, then
count. Basically I have four requirements for cell B2
0-25% then C2 must be 70% or higher to count
26-35% then C2 must be 75% or higher to count
36-45% then C2 must be 80% or higher to count
46 or greater then C2 must be 90% or higher to count
I'm not sure if I can create one embedded formula or have to write
separate formulas for each criteria above.


Not sure what you mean by "to count" when talking about a single pair of
cells, B2 and C2.

If you mean that you are looking at a range of rows, for example B2:B100 and
C2:C100, and you want to count the number of pairs that qualify, then:

=SUMPRODUCT(--((B2:B100<=25%)*(C2:C100=70%)
+ (B2:B10025%)*(B2:B100<=35%)*(C2:C100=75%)
+ (B2:B10035%)*(B2:B100<=45%)*(C2:C100=80%)
+ (B2:B10045%)*(C2:C100=90%)0))

or

=SUMPRODUCT(--((B2:B100<26%)*(C2:C100=70%)
+ (B2:B100=26%)*(B2:B100<36%)*(C2:C100=75%)
+ (B2:B100=36%)*(B2:B100<46%)*(C2:C100=80%)
+ (B2:B100=46%)*(C2:C100=90%)0))

The choice depends on your intended meaning of the ranges 0-25% v. 26-35%.
Note that there are an "infinite" number of values between 25% and 26%
unaccounted for, unless you ensure that B2 is rounded to 2 decimal places.

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
Nested If statement -- please help :) HS[_2_] New Users to Excel 8 May 5th 09 12:18 AM
If then nested statement Carter Excel Worksheet Functions 7 January 15th 09 03:46 AM
IF and OR nested statement help [email protected] Excel Discussion (Misc queries) 4 July 16th 07 10:22 PM
IF STATEMENT - NESTED tojo107 Excel Worksheet Functions 4 April 19th 07 08:14 PM
NESTED IF STATEMENT jmsbert Excel Worksheet Functions 10 October 10th 05 04:25 PM


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