Novice Needs Help: Broken Formula

mbrown279

New Member
Joined
Sep 16, 2018
Messages
10
Hello All, Novice Here

I am trying to use a formula that will assign a value based on the words it finds in the table. I am not sure what I am missing. I want the resulting value 1-5 to appear in the "Raw" column. The table below is the mock up of what I am looking to do.


Code:
=IF([@Answer]="", "",IF([@Answer]"Very Satisfied",5,IF([@Answer]"Satisfied",4,IF([@Answer]"Neither Satisfied Nor Dissatisfied"
,3,IF([@Answer]"Dissatisfied",2,IF([@Answer]"Very Dissatisfied",1,)))))))

[TABLE="width: 500"]
<tbody>[TR]
[TD]Survey Type[/TD]
[TD]Answer[/TD]
[TD]Raw[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Post-Chat[/TD]
[TD]Very Satisfied[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
This might be a better approach than a long, nested IF statement.

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
Book1
ABCDEFG
1
2Very Satisfied5
3Satisfied4
4Neither Satisfied Nor Dissatisfied3
5Survey TypeAnswerRawDissatisfied2
6Post-ChatVery Satisfied5Very Dissatisfied1
7PollDissatisfied2
8Interview
Sheet20
Cell Formulas
RangeFormula
C6=IFNA(VLOOKUP([@Answer],$F$1:$G$5,2,0),"")
[/FONT]
 
Upvote 0
How about:

=IF([@Answer]="","",MATCH([@Answer],{"Very Dissatisfied","Dissatisfied","Neither Satisfied nor dissatisfied","Satisfied","Very satisfied"},0))
 
Upvote 0
How about:

=IF([@Answer]="","",MATCH([@Answer],{"Very Dissatisfied","Dissatisfied","Neither Satisfied nor dissatisfied","Satisfied","Very satisfied"},0))

You sir are a god, thank you so much, that fixed it. Would you be able to explain how this works?
 
Upvote 0
Sure, it's just a basic MATCH function. If you look for a value ([@Answer]) in a list, MATCH returns the position of that value. Usually that list is kept in a range of cells on the sheet, like DRSteele has, but you can include the list as part of the function by surrounding it with the { and } symbols. Then you just have to make sure the list is in the order you want, and give it the 0 parameter to tell it to search sequentially.

Glad we could help. :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
Members
453,021
Latest member
Justyna P

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