# Count of Words in a Cell by UDF

Function for counting words in a cell excluding space (ready vba code just copy , paste and run)

`Function COUNTWORDS(Text_String As String) As Integer 'User define function counts the number of words in a cell exclude space 'www.anilnahar.com`
`String_Length = Len(Text_String)`
`For Current_Character = 1 To String_Length`
```COUNTWORDS = 0
Dim String_Length As Integer
Dim Current_Character As Integer```
```If (Mid(Text_String, Current_Character, 1)) = " " Then
COUNTWORDS = COUNTWORDS + 1
End If```
```Next Current_Character
End Function```

# EXCEL IMPORTANCE in chartered accountacy career told by CA PARVEEN SHARMA

So a place where CA Student as a professional lacking behind is MS Office or particularly Excel, Many of the CA Student that are under going article-ship, don’t even know how to use some of the basic functions in excel.

So we tried to help you out with article on some of the basic excel function that you must know with our blog tutorials.

# Auto Fit Columns

Sub AutoFitColumns()

‘ Smart code for Autofit all columns of Active Worksheet

‘ Smart Excel(anilnahar.com)

Cells.Select

Cells.EntireColumn.AutoFit

End Sub

# Alphabets Serial Capital And Small Letter

Sub Alphabets_capital()
‘ Smart code for Serial Alphabets in Capital Letters from select cell
‘ Smart Excel (www.anilnahar.com)
Dim i As Integer
For i = 65 To 90
ActiveCell.Value = Chr(i)
ActiveCell.Offset(1, 0).Select
Next i
End Sub
—————
Sub Alphabets_small()
‘ Smart code for Serial Alphabates in Small Letters from select cell
‘ Smart Excel(anilnahar.com)
Dim i As Integer
For i = 97 To 122
ActiveCell.Value = Chr(i)
ActiveCell.Offset(1, 0).Select
Next i
End Sub