Hi Team,
I have created a vbo code that will convert all data in excel to lower case, remove “n/a” to " " in res2 and res3 column of excel…but it is not working…can anyone help ?
Sub RoundToZero1()
Dim lRow As Long
lRow = ThisWorkbook.ActiveSheet.UsedRange.Rows.Count
For Counter = 1 To lRow
Set Curcell = ThisWorkbook.ActiveSheet.Cells(Counter, 5)
If Curcell.Value = "N/A" Then
Curcell.Value = ""
Else: Curcell.Value = LCase(Curcell.Value)
End If
Set Curcell = ThisWorkbook.ActiveSheet.Cells(Counter, 6)
If Curcell.Value = "N/A" Then
Curcell.Value = ""
Else: Curcell.Value = LCase(Curcell.Value)
End If
Set Curcell = ThisWorkbook.ActiveSheet.Cells(Counter, 7)
If Curcell.Value = "N/A" Then
Curcell.Value = ""
Else: Curcell.Value = LCase(Curcell.Value)
End If
@som17 If you were able to get the output for the above VBA code which you have given, but it was only Converting some values but you want to convert all values in the Excel to lowercase then you can try this code I have provided below. VBA Code.txt (469 Bytes)
thanks superman…but if u see my above VBO code…it is converting “res2” and res3 coulmns to blank i.e. “” if there is “n/a” or “N/A”, “N\A” present in them.
@som17 So if there is a “n/a” or “N/A” as a value in the Cell then it should be made empty. If so, I think this updated code should give you the output. VBA Code.txt (499 Bytes)