You are on page 1of 3

Sub rowHeight()

Dim fResp As String, sResp As String


Dim siz As Integer, ht As Double

fResp = InputBox("Input the Column Name which has to be selected", "Initial Colu
mn Selection", "A")
sResp = InputBox("Input the Column Name Where the Results have to be displayed",
"Initial Column Selection", "M")

Range(fResp & "1:" & fResp & "200").Select

For Each Cell In Selection

If Cell.Value <> "" Then

siz = Cell.Font.Size
ht = Cell.rowHeight

Select Case siz


Case 10
Select Case ht
Case 18, 16, 13
GoTo 1
Case Else
With Range(sResp & Cell.Row)
.Value = ht
.Interior.ColorIndex = 3
.Interior.Pattern = xlSolid
End With
End Select
Case 9
Select Case ht
Case 17, 15, 12
GoTo 1
Case Else
With Range(sResp & Cell.Row)
.Value = ht
.Interior.ColorIndex = 3
.Interior.Pattern = xlSolid
End With
End Select
Case 8
Select Case ht
Case 16, 14, 11
GoTo 1
Case Else
With Range(sResp & Cell.Row)
.Value = ht
.Interior.ColorIndex = 3
.Interior.Pattern = xlSolid
End With
End Select
Case 7
Select Case ht
Case 15, 13, 10
GoTo 1
Case Else
With Range(sResp & Cell.Row)
.Value = ht
.Interior.ColorIndex = 3
.Interior.Pattern = xlSolid
End With
End Select
Case 6
Select Case ht
Case 14, 12, 9
GoTo 1
Case Else
With Range(sResp & Cell.Row)
.Value = ht
.Interior.ColorIndex = 3
.Interior.Pattern = xlSolid
End With
End Select
Case Else
Range(sResp & Cell.Row).Value = "Invalid Font - User Action Requ
ired"
End Select
End If
1: Next

fResp = ""
sResp = ""
End Sub

Sub CountMe()
MsgBox ThisWorkbook.Sheets.Count & " sheets available"
End Sub

Sub CountMe()
Range("A1").Value = ThisWorkbook.Sheets.Count
End Sub

You might also like