Hi.
I've a suggestion in 2 steps.
#1 Highlight the range and go via "Data" to "Text to Columns"
The Result = one word in one cell:
<table style="font-family:Calibri,Arial; font-size:10pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"> <colgroup><col style="font-weight:bold; width:30px; "><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"></colgroup><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td>
</td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td><td>F</td><td>G</td><td>H</td><td>I</td></tr><tr style="height:23px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">1</td><td style="text-align:center; ">Very</td><td style="text-align:center; ">Very</td><td style="text-align:center; ">Very</td><td style="text-align:center; ">Very</td><td style="text-align:center; ">Very</td><td style="text-align:center; ">Very</td><td style="text-align:center; ">Big</td><td>
</td><td>
</td></tr><tr style="height:23px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">2</td><td style="text-align:center; ">Red</td><td style="text-align:center; ">Red</td><td style="text-align:center; ">Red</td><td style="text-align:center; ">Blue</td><td style="text-align:center; ">Blue</td><td style="text-align:center; ">Blue</td><td style="text-align:center; ">Blue</td><td style="text-align:center; ">Yellow</td><td style="text-align:center; ">Green</td></tr><tr style="height:23px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">3</td><td style="text-align:center; ">Yes</td><td style="text-align:center; ">Yes</td><td style="text-align:center; ">Yes</td><td style="text-align:center; ">Yes</td><td style="text-align:center; ">Yes</td><td style="text-align:center; ">Yes</td><td style="text-align:center; ">Yes</td><td style="text-align:center; ">Yes</td><td>
</td></tr></tbody></table>
#2 Macrostart:
Code:
Option Explicit
Public Sub gohotels()
Dim arrIn As Variant, L As Long, I As Integer
Dim out As Variant, a As Long, b As Integer
Dim myDic As Object
With Sheets("Sheet1") '[COLOR=Red]Your sheetname[/COLOR]
arrIn = .Range("a1").CurrentRegion
ReDim out(1 To UBound(arrIn), 1 To UBound(arrIn, 2))
Set myDic = CreateObject("Scripting.Dictionary")
For L = LBound(arrIn) To UBound(arrIn)
myDic.RemoveAll
a = a + 1
b = 0
For I = 1 To UBound(arrIn, 2)
If arrIn(L, I) <> "" Then
If Not myDic.exists(arrIn(L, I)) Then
myDic(arrIn(L, I)) = 0
b = b + 1
out(a, b) = arrIn(L, I)
End If
End If
Next
Next
.Range("a1").CurrentRegion = out
End With
End Sub
The Result =
<table style="font-family:Calibri,Arial; font-size:10pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"> <colgroup><col style="font-weight:bold; width:30px; "><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"><col style="width:48.8px;"></colgroup><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td>
</td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td><td>F</td><td>G</td><td>H</td><td>I</td></tr><tr style="height:23px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">1</td><td style="text-align:center; ">Very</td><td style="text-align:center; ">Big</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td></tr><tr style="height:23px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">2</td><td style="text-align:center; ">Red</td><td style="text-align:center; ">Blue</td><td style="text-align:center; ">Yellow</td><td style="text-align:center; ">Green</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td></tr><tr style="height:23px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">3</td><td style="text-align:center; ">Yes</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td></tr></tbody></table>