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>
 

portews

Active Member
Joined
Sep 4, 2009
Messages
303
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)
 

Forum statistics

Threads
1,082,300
Messages
5,364,386
Members
400,796
Latest member
vrcdesktop

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top