kashifundlas said:
yar ye new column/row mein hota hai mein ossi column/row mein rehta huay kerna chahta hon
Try
1. Alt+F11
2. Insert---->Module
copy this code and paste in module
Code:
Sub testChangeCase()
Static lngClickCount As Long
Static strLastAddress As String 'this variable is for resetting the cycle
Dim lngCase As VbStrConv
Dim rngToCheck As Range
Dim rngCell As Range
On Error GoTo ErrorHandler
If TypeOf Selection Is Range Then
If strLastAddress = Selection.Address(External:=True) Then
lngClickCount = lngClickCount + 1
Else
lngClickCount = 0
End If
strLastAddress = Selection.Address(External:=True)
Select Case lngClickCount Mod 3
Case 0
lngCase = vbLowerCase
Case 1
lngCase = vbUpperCase
Case 2
lngCase = vbProperCase
End Select
If Selection.Cells.Count = 1 Then
If Not Selection.HasFormula Then
If VarType(Selection.Value2) = vbString Then
Set rngToCheck = Selection
End If
End If
ElseIf Selection.Cells(1).MergeArea.Address = Selection.Address Then
If Not Selection.HasFormula Then
If VarType(Selection.Value2) = vbArray + vbVariant Then
Set rngToCheck = Selection
End If
End If
Else
On Error Resume Next
Set rngToCheck = Selection.SpecialCells(xlCellTypeConstants, xlTextValues)
On Error GoTo 0
End If
If Not rngToCheck Is Nothing Then
Application.EnableEvents = False
For Each rngCell In rngToCheck.Cells
rngCell.Value2 = StrConv(rngCell.Value2, lngCase)
Next rngCell
End If
End If
CleanUp:
On Error Resume Next
Application.EnableEvents = True
Exit Sub
ErrorHandler:
MsgBox Err.Number & vbNewLine & Err.Description 'Debug.Print
Resume CleanUp
End Sub
apne range ko select karain aur macro ko run karain. aap ka masla hal ho jae ga. Ya phir ASAP utilities download kar lain.
regards,
Bookmarks