IF Statement with multiple conditions

IronMan1982

New Member
Joined
May 8, 2015
Messages
20
Hi All

i need some help writing a formula with multiple conditions that returns a score depending on the %
-
in addition to this I also need another formula that would place a score in an adjacent cell depending on if the cell preceeding it is Green or Red (-10 for green, +10 for Red)

[TABLE="width: 2029"]
<TBODY>[TR]
[TD][/TD]
[TD]
A</SPAN>​
[/TD]
[TD]
B</SPAN>​
[/TD]
[TD]
C</SPAN>​
[/TD]
[TD]
D</SPAN>​
[/TD]
[TD]
E</SPAN>​
[/TD]
[TD]
F</SPAN>​
[/TD]
[TD]
G</SPAN>​
[/TD]
[TD]
H</SPAN>​
[/TD]
[TD]
I</SPAN>​
[/TD]
[TD]
J</SPAN>​
[/TD]
[TD]
K</SPAN>​
[/TD]
[/TR]
[TR]
[TD]
1</SPAN>​
[/TD]
[TD]
Top 15's</SPAN>
[/TD]
[TD][/TD]
[TD]
ALL</SPAN>​
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD][/TD]
[TD]
%</SPAN>
[/TD]
[TD]
Risk Score</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
2</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
100-75</SPAN>​
[/TD]
[TD]
5</SPAN>​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
3</SPAN>​
[/TD]
[TD]
Channel - Top 25</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
74-60</SPAN>​
[/TD]
[TD]
4</SPAN>​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
4</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
59 - 45</SPAN>​
[/TD]
[TD]
3</SPAN>​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
44 - 30</SPAN>​
[/TD]
[TD]
2</SPAN>​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
29 - 15</SPAN>​
[/TD]
[TD]
1</SPAN>​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
14 - 0</SPAN>​
[/TD]
[TD]
0</SPAN>​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
9</SPAN>​
[/TD]
[TD]
DEBT CONSOLIDATION</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
10</SPAN>​
[/TD]
[TD]
*** Broker IQM Area***</SPAN>​
[/TD]
[TD]
IQM Area</SPAN>​
[/TD]
[TD]
ALL</SPAN>​
[/TD]
[TD]
LB</SPAN>​
[/TD]
[TD]
NR</SPAN>​
[/TD]
[TD]
TB</SPAN>​
[/TD]
[TD]
VS</SPAN>​
[/TD]
[TD]
#N/A</SPAN>​
[/TD]
[TD]
Grand Total 2015</SPAN>​
[/TD]
[TD]
% of Debt Consolidation</SPAN>​
[/TD]
[TD]
Risk Score</SPAN>​
[/TD]
[/TR]
[TR]
[TD]
11</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]
7</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]
10</SPAN>​
[/TD]
[TD="align: right"]
70.00%</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
12</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]
6</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]
10</SPAN>​
[/TD]
[TD="align: right"]
60.00%</SPAN>​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi

A few things to get you started:

If you change your lookup table in I and J to just include the minimum threshold and reverse the order so it goes from lowest to highest, you can use an inexact VLOOKUP. In this case the I column would read 0, 15, 30, 45, 60, 75 (or possibly these numbers divided by 100, depending on your data). You would then =VLOOKUP(your_%_value,I$2:J$7,2,1). This inexact match will return the J column corresponding to the nearest lowest value of the I column, so if your_%_value was, say, 38%, it would return the 30% risk score of 2.

You'll have to be more specific about matching on multiple conditions, I don't know what it is you want to return based on what conditions.

There aren't formulaic ways to change a cell based on formatting, and I would generally not recommend using colours to drive data rather than the other way round - however, if you formatted the cell to Green based on a formula, then you could reuse the original formula to add or subtract 10 (i.e. the formula is the common cause, rather than the formula driving the colour driving the addition/subtraction).

Hope that helps

Mackers
 
Upvote 0
Hi
I am trying to create an if statement for multiple values (18) and I tried using the following but the limit is 7 - =IF(SEARCH("SOUTHPOINT",A:A),"SOUTHPOINT",),IF(SEARCH("DUBLIN",A:A),"DUBLIN",), and so on with 16 more values but it wont let me do more than 7, how does one extend the if formula to the amount I need?
 
Upvote 0
Hi

A few things to get you started:

If you change your lookup table in I and J to just include the minimum threshold and reverse the order so it goes from lowest to highest, you can use an inexact VLOOKUP. In this case the I column would read 0, 15, 30, 45, 60, 75 (or possibly these numbers divided by 100, depending on your data). You would then =VLOOKUP(your_%_value,I$2:J$7,2,1). This inexact match will return the J column corresponding to the nearest lowest value of the I column, so if your_%_value was, say, 38%, it would return the 30% risk score of 2.

You'll have to be more specific about matching on multiple conditions, I don't know what it is you want to return based on what conditions.

There aren't formulaic ways to change a cell based on formatting, and I would generally not recommend using colours to drive data rather than the other way round - however, if you formatted the cell to Green based on a formula, then you could reuse the original formula to add or subtract 10 (i.e. the formula is the common cause, rather than the formula driving the colour driving the addition/subtraction).

Hope that helps

Mackers

Thank you Mackers I will give that a go. Also thanks for advice about colour situation. I need to learn how to use the index function I think.
 
Upvote 0
Index is a fairly straightforward function for basic use but a very powerful tool for advanced use.

The most basic useful index function is:

=INDEX(YourDesiredSingleColumnOrRow, MATCH(YourValue, CorrespondingValues, 0))

This is essentially a slightly more powerful version of a VLOOKUP - you are comparing one value to a row or column (say trying to find a name in a list of names), finding the position of the matching value (say the 4th row down), then returning the corresponding value of a different row or column (say finding the salary corresponding to the person in the 4th position).

If you have any questions or specific implementation requirements let me know, I'd be glad to help.

Mackers
 
Upvote 0
thanks mate i will try and send you the data and explanation of what i want too do and see if it is a better option than vlookup.
 
Upvote 0
Hi
I am trying to create an if statement for multiple values (18) and I tried using the following but the limit is 7 - =IF(SEARCH("SOUTHPOINT",A:A),"SOUTHPOINT",),IF(SEARCH("DUBLIN",A:A),"DUBLIN",), and so on with 16 more values but it wont let me do more than 7, how does one extend the if formula to the amount I need?

Hi taylor

As an array function, executed using control+shift+enter:

=INDEX(A:A,MIN(IFERROR(MATCH({"SOUTHPOINT","DUBLIN","CHICAGO","CORK"},A:A,0),"")))

Add in any cities in the curly bracers {"City1","City2","City3",...,"Cityn"}. Note that if your column A:A has more than one matching value from the list of cities, say both Southpoint and Dublin, then it will return the first one in the MATCH() list. Also in general it's a good idea to start a new topic if you have a question.

Hope that helps

Mackers
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top