How to Avoid Repetitive Values when using IF formulas

itsmecassiec

New Member
Joined
Jan 11, 2017
Messages
4
I have an excel database of survey information that returns the 1st, 2nd, and 3rd lowest values using SMALL formula, but I applied an IF formula on the spreadsheet to return the statement that value is tied to. However, if the value is the same it returns the same statement twice, rather than moving on to the next question with that value. Is there a way to avoid this?


Example of formula returning questions based on ranking:
=IF(V22=H22,$H$1,IF(V22=I22,$I$1,IF(V22=J22,$J$1,IF(V22=K22,$K$1,IF(V22=L22,$L$1,IF(V22=M22,$M$1,IF(V22=N22,$N$1,IF(V22= O22,$O$1,IF(V22=P22,$P$1,IF(V22=Q22,$Q$1,IF(V22=R22,$R$1,IF(V22=S22,$S$1,IF(V22=T22,$T$1,"None")))))))))))))

An example would be the first row below. The same statement appears twice because of identical values. How can I prevent this from happening?


My fellow employees are committed to doing quality work.I have a best friend at work.In the last six months, someone at work has talked with me about my progress.In the last year, I have had opportunities to learn and grow.Rank 1st LowestRank 2nd LowestRank 3rd LowestLowest2nd Lowest3rd Lowest
3.703.203.503.903.203.203.50At work, my opinions seem to count.At work, my opinions seem to count.In the last seven days, I have received recognition or praise for doing good work.
4.563.634.334.563.634.334.33I have a best friend at work.My supervisor, or someone at work, seems to care about me as a person.My supervisor, or someone at work, seems to care about me as a person.
4.293.174.144.143.174.004.14I have a best friend at work.I am satisfied with IDEA as a place to work.In the last six months, someone at work has talked with me about my progress.
4.333.7788.004.463.774.004.17I have a best friend at work.There is someone at work who encourages my development.At work, my opinions seem to count.

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
To get the 1st lowest, the simple SMALL formula will work, obviously, so in V22

Code:
=SMALL($H22:$T22,1)

For the 2nd and 3rd lowest numbers it looks like (and I'm still learning this myself) and array formula will work to get the next highest unique number. In W22 put this formula and hit Shift+Ctrl+Enter to make it an array formula:
Code:
=SMALL(IF($H22:$T22>V22,$H22:$T22),1)
In X22 put this formula and hit Shift+Ctrl+Enter to make it an array formula:
Code:
=SMALL(IF($H22:$T22>W22,$H22:$T22),2)

You can use an offset/match to return the column header, but, if you have duplicate numbers in the row, It looks like it will be the left most match.
Where $H$1 is the first statement you want to return, $H22:$T22 is the values you're matching against and V22 is the criteria you're matching in H-T.

Code:
=OFFSET($H$1,0,MATCH(V22,$H22:$T22,0)-1)
 
Upvote 0

Forum statistics

Threads
1,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

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