您當前的位置:首頁 > 舞蹈

分類的不規則動詞表整理

作者:由 tsiensun 發表于 舞蹈時間:2018-04-15

不規則動詞資料來源:

複製於百科網站,將其黏貼至Excel表格中

原始資料形式:

缺點:以首字母排列,並且沒有相關變形的基本分類,且有很多拓展的單詞。總體感官是雜亂的,不利於後期的記憶。

分類的不規則動詞表整理

理想的表格需求:

直觀性1

:分了過去式 和 過去分詞 的變化規律。並按變形型別規律為第一規律排序

直觀性2

:對單詞進行了分類,同源單詞連續排列,並統一背景色,很好地區分

直觀性3

:拓展的單詞,在原型單詞部分,以不同的字型標記出拓展的字首部分。

——————-歸類後的表格整體更利於記憶

程式思路

Sub 不規則動詞分類排序()

‘迴圈

’歸類單詞的變化規律

‘AAA AAB ABB ABA ABC 形式

’錄製宏

‘按理想要求進行排序

’特徵標記

‘大迴圈=================

’小迴圈——-

‘對其後的單詞進行尾部一致性檢驗並標記

’——————-

‘=======================

End Sub

完整程式碼

Sub 不規則動詞分類排序()

Dim I As Integer: I = 2

Dim J As Integer

Dim S As String

’——————————————————-標記變形形式

Do While Cells(I, 1) <> “”

A = Cells(I, 1)。Value

B = Cells(I, 2)。Value

C = Cells(I, 3)。Value

If A = B And A <> C Then

Cells(I, 5) = “AAB”

ElseIf A = B And A = C Then

Cells(I, 5) = “AAA”

ElseIf A <> B And B = C Then

Cells(I, 5) = “ABB”

ElseIf A = C And A <> B Then

Cells(I, 5) = “ABA”

Else

Cells(I, 5) = “ABC”

End If

S = “” ‘單詞反向組合,為排序作參考

For J = Len(A) To 1 Step -1

S = S & Mid(A, J, 1)

Next

Cells(I, 6) = S

I = I + 1

Loop

’——————————————————-排序(宏錄製修改)

ActiveWorkbook。Worksheets(“Sheet1”)。Sort。SortFields。Clear

ActiveWorkbook。Worksheets(“Sheet1”)。Sort。SortFields。Add Key:=Range(“E2:E” & I) _

, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal

ActiveWorkbook。Worksheets(“Sheet1”)。Sort。SortFields。Add Key:=Range(“F2:F” & I) _

, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal

ActiveWorkbook。Worksheets(“Sheet1”)。Sort。SortFields。Add Key:=Range(“A2:A” & I) _

, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal

With ActiveWorkbook。Worksheets(“Sheet1”)。Sort

。SetRange Range(“A1:F” & I)

。Header = xlYes

。MatchCase = False

。Orientation = xlTopToBottom

。SortMethod = xlPinYin

。Apply

End With

‘——————————————————標記詞語的相似性

Dim EndLine As Integer: EndLine = I

Dim Color As Boolean ’設定底色

Dim Rng As Range

For I = 2 To EndLine

S = Cells(I, 6)

For J = I + 1 To EndLine

If Left(Cells(J, 6), Len(S)) = S Then

With Cells(J, 1)。Characters(Start:=1, Length:=Len(Cells(J, 1)) - Len(Cells(I, 1)))。Font

。Name = “Arial”

。FontStyle = “加粗傾斜”

。Size = 9

。Strikethrough = False

。Superscript = False

。Subscript = False

。OutlineFont = False

。Shadow = False

。Underline = xlUnderlineStyleNone

。ThemeColor = xlThemeColorLight1

。TintAndShade = 0

。ThemeFont = xlThemeFontNone

End With

Else

Set Rng = Range(“A” & I & “:F” & J - 1)

If J > I + 1 Then

With Rng

。HorizontalAlignment = xlRight

。VerticalAlignment = xlCenter

。WrapText = True

。Orientation = 0

。AddIndent = False

。IndentLevel = 0

。ShrinkToFit = False

。ReadingOrder = xlContext

。MergeCells = False

End With

If Color Then ‘間隔區分樣式

With Rng。Interior

。Pattern = xlSolid

。PatternColorIndex = xlAutomatic

。ThemeColor = xlThemeColorDark1

。TintAndShade = -0。149998474074526

。PatternTintAndShade = 0

End With

Else

With Rng。Borders(xlInsideHorizontal)

。LineStyle = xlContinuous

。ThemeColor = 1

。TintAndShade = -0。349986266670736

。Weight = xlThin

End With

End If

Else

If Color Then ’間隔區分樣式

With Rng。Interior

。Pattern = xlSolid

。PatternColorIndex = xlAutomatic

。ThemeColor = xlThemeColorDark1

。TintAndShade = -0。149998474074526

。PatternTintAndShade = 0

End With

Else

With Rng。Borders(xlInsideHorizontal)

。LineStyle = xlContinuous

。ThemeColor = 1

。TintAndShade = -0。349986266670736

。Weight = xlThin

End With

End If

End If

I = J - 1

Color = Not Color

Exit For

End If

Next

Next

End Sub

整理後的表格

分類的不規則動詞表整理

標簽: Cells  false  RNG  單詞  worksheets