FeedBack Extractor in Excel

sanket_sk

Board Regular
Joined
Dec 27, 2016
Messages
140
Office Version
  1. 365
Platform
  1. Windows
Dear All,



Merry Christmas !!!



I am working on consumer feedback, there are thousand of entries out of which I want to extract actual expressions of consumers, for which I am looking for formula which will return common word used in cell and count of those words.



For example …



Consumer feedbacks are captured in Column “D: D” in sheet1, in sheet2 we can apply VBA or formula which will return following result..



A1 B1

Excellent 900

Bad 400

Improve 250



And so on ..



Please help me build this formula
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Do you want a count of all words, or just specific words?
 
Upvote 0
With your data provided, I think that you don't need, this layout.
I'm assuming, a points table for this example.
I'm so sorry, if I don't understand you at all
But, attach, you will see my suggestion (adding a Pivot Table, instead Sheet2)


Book1
ABCDEFG
1datenameproductPointsQualify
201/02/2019MikelTV800Excellent
323/04/2019JoseDVD650Bad
425/09/2019DonaModem250Improve
526/09/2019SteveTV400Bad
612/10/2019MariaDVD900Excellent
701/11/2019HernanTV700Excellent
8 
9 
10 
11  
12 
13 
14 
15 
16
17
18
19
20
21
Sheet1
Cell Formulas
RangeFormula
A11A11=""
E2:E15E2=IF(ISBLANK(Sheet1!D2),"",IF(AND(Sheet1!D2>=Sheet2!$F$2),"Excellent",IF(AND(Sheet1!D2<Sheet2!$F$2,Sheet1!D2>=Sheet2!$F$3), "Bad","Improve")))
Named Ranges
NameRefers ToCells
myRange=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A$2:$A$1000),COUNTA(Sheet1!$A$1:$M$1))E2:E7


Book1
ABCDEFGHIJKL
1ResultPointsfeedback tableLowTopYour data
2Excellent800Excellent7001000Excellent900
3Bad650Bad400699Bad400
4Improve250Improve0399Improve250
5Bad400
6Excellent900
7Excellent700
8  
9  
10  
11  
12  
13
14
15
16
17
18
19
20
21
22
23
Sheet2
Cell Formulas
RangeFormula
A2:A12A2=IF(ISBLANK(Sheet1!D2),"",IF(AND(Sheet1!D2>=Sheet2!$F$2),"Excellent",IF(AND(Sheet1!D2<Sheet2!$F$2,Sheet1!D2>=Sheet2!$F$3), "Bad","Improve")))
B2:B12B2=IF(ISBLANK(Sheet1!D2),"",Sheet1!D2)
 
Upvote 0
HI All,

Thanks for replies...

Consumer feedback will be dynamic, where different words will be used , i am looking for formula / VBA which will extract common used words with count.

Sanket
 
Upvote 0
If you don't have a standard, I think you could get complicated with Excel, and you might have to migrate to Python
 
Upvote 0
This will output all the used words to sheet2 & the number of times each word was used.
VBA Code:
Sub sanket_sk()
    Dim Cl As Range
    Dim Dic As Object
    Dim Sp As Variant
    Dim i As Long
    
    Set Dic = CreateObject("scripting.dictionary")
    With Sheets("Sheet1")
        For Each Cl In .Range("D2", .Range("D" & Rows.Count).End(xlUp))
            Sp = Split(Cl.Value, " ")
            For i = 0 To UBound(Sp)
                Dic.Item(Sp(i)) = Dic.Item(Sp(i)) + 1
            Next i
        Next Cl
    End With
    Sheets("Sheet2").Range("A2").Resize(Dic.Count, 2).Value = Application.Transpose(Array(Dic.Keys, Dic.Items))
End Sub
 
Upvote 0
This will output all the used words to sheet2 & the number of times each word was used.
VBA Code:
Sub sanket_sk()
    Dim Cl As Range
    Dim Dic As Object
    Dim Sp As Variant
    Dim i As Long
   
    Set Dic = CreateObject("scripting.dictionary")
    With Sheets("Sheet1")
        For Each Cl In .Range("D2", .Range("D" & Rows.Count).End(xlUp))
            Sp = Split(Cl.Value, " ")
            For i = 0 To UBound(Sp)
                Dic.Item(Sp(i)) = Dic.Item(Sp(i)) + 1
            Next i
        Next Cl
    End With
    Sheets("Sheet2").Range("A2").Resize(Dic.Count, 2).Value = Application.Transpose(Array(Dic.Keys, Dic.Items))
End Sub

Gr8 solution ..... Thank a lot
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
This will output all the used words to sheet2 & the number of times each word was used.
VBA Code:
Sub sanket_sk()
    Dim Cl As Range
    Dim Dic As Object
    Dim Sp As Variant
    Dim i As Long
   
    Set Dic = CreateObject("scripting.dictionary")
    With Sheets("Sheet1")
        For Each Cl In .Range("D2", .Range("D" & Rows.Count).End(xlUp))
            Sp = Split(Cl.Value, " ")
            For i = 0 To UBound(Sp)
                Dic.Item(Sp(i)) = Dic.Item(Sp(i)) + 1
            Next i
        Next Cl
    End With
    Sheets("Sheet2").Range("A2").Resize(Dic.Count, 2).Value = Application.Transpose(Array(Dic.Keys, Dic.Items))
End Sub
Hi Fluff,

Although the solution works very well for us, however, is it possible to also extract common sentences in descending order?...

Example...
  1. “Power problem solve” -100
  2. “Cleaning done” – 96
  3. “Feature Explanation”- 87…. And so on
Thanks & Regards,
Sanket
 
Upvote 0
Depends on what your data looks like, but as this is a significantly different question, it needs a new thread.
 
Upvote 0

Forum statistics

Threads
1,216,308
Messages
6,129,993
Members
449,550
Latest member
LML2892

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