rob_kzk

New Member
Joined
Jul 28, 2008
Messages
21
Hi All,

Hope someone can help with this...

I have 8 statements that can all have an answer between 0 and 4, if the statements total a value between two numbers this produces a pre-defined outcome, however what I have been asked to do is if all statements have an answer of 3 or 4 and only one of the answers is 2 then a different outcome is produced with the result being "3G".

I have re-created the sort of table I am looking at below with the results in columns B and E. If the outcome of all statements was as below this would produce the "3G" outcome but the spread of 3's and 4's and one 2 could be totally random.

ABCDE
Statement 13Statement 54
Statement 24Statement 64
Statement 32Statement 73
Statement 43Statement 84

<tbody>
</tbody>

What is the best formula to use for this?

Thank you for your help.

Rob
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I have 8 statements that can all have an answer between 0 and 4, if the statements total a value between two numbers this produces a pre-defined outcome, however what I have been asked to do is if all statements have an answer of 3 or 4 and only one of the answers is 2 then a different outcome is produced with the result being "3G".
I have re-created the sort of table I am looking at below with the results in columns B and E. If the outcome of all statements was as below this would produce the "3G" outcome but the spread of 3's and 4's and one 2 could be totally random.
Statement 13row 6
Statement 220abyssmal
Statement 326terrible
Statement 4312bad
Statement 5418acceptable
Statement 6424good
Statement 7328excellent
Statement 84good32superb
I made a lookup table with some pretend outcomes
the following formula produces either 3G or a word from the table
=IF(AND(COUNTIF($B$6:$B$13,3)+COUNTIF($B$6:$B$13,4)=7,COUNTIF($B$6:$B$13,2)=1),"3G",VLOOKUP(SUM($B$6:$B$13),mytable,2))
note score is 25 which is less than 28 so good is returned

<colgroup><col><col span="2"><col><col span="11"></colgroup><tbody>
</tbody>
 
Upvote 0
That's great, thank you oldbrewer.

Just one further enhancement if I may, please can you confirm how I would need to update the formula if the table was set out in my original post with 4 statements producing answers in column B and 4 statements producing answers in column E? I have an inkling but if you could confirm it would be appreciated.

Thanks again.

Rob
 
Upvote 0
Statement 13Statement 54
Statement 22Statement 640abyssmal
Statement 32Statement 736terrible
Statement 43Statement 8412bad
18acceptable
24good
28excellent
32superb
good
note score is 25 which is less than 28 so good is returned
new formula
=IF(AND(COUNTIF($B$1:$B$4,3)+COUNTIF($E$1:$E$4,3)+COUNTIF($B$1:$B$4,4)+COUNTIF($E$1:$E$4,4)=7,COUNTIF($B$1:$B$4,2)+COUNTIF($E$1:$E$4,2)=1),"3G",VLOOKUP((SUM($B$1:$B$4)+SUM($E$1:$E$4)),mytable,2))

<colgroup><col><col span="2"><col><col span="20"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,857
Messages
6,121,948
Members
449,056
Latest member
FreeCricketId

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