
For i = 1 To 10
X = IsNumeric(Range("A" & i))
If X = "Vero" And X <> "" Then
Range("a" & i) = "data" & Range("a" & i)
End If
Next i |
1 2 3 4 PIPPO PLUTO TOPOLINO A S V A 1 2 ----------------------------------- data1 data2 data3 data4 PIPPO PLUTO TOPOLINO A S V |
A - B
10-22
112-44
-22
25-
-33
-2
45-4
-5
24-
55-110
Range A1:B10
valori iniziali
data10-data22
data112-data44
-data22
data25-
-data33
-data2
data45-data4
-data5
DATA24-
data55-data110
dopo la macro
|
Application.ScreenUpdating = False
Range("e10").Select
For i = 1 To 3
ActiveCell.Offset(0, 1).Select
valore = ActiveCell.Value
valore2 = IsNumeric(valore)
If valore2 = True Then
ActiveCell.Value = "data" & valore
If ActiveCell.Value = "data" Then
ActiveCell.Value = ""
End If
End If
Next i
Range("f45").Select
For i = 1 To 10
ActiveCell.Offset(0, 1).Select
valore = ActiveCell.Value
valore2 = IsNumeric(valore)
If valore2 = True Then
ActiveCell.Value = "data" & valore
If ActiveCell.Value = "data" Then
ActiveCell.Value = ""
End If
End If
Next i
Application.ScreenUpdating = True |
Application.ScreenUpdating = False
For i = 1 To 10
VALORE = IsNumeric(Range("A" & i))
If VALORE = True Then
Range("A" & i) = "data" & Range("a" & i)
End If
valore2 = Range("a" & i)
If valore2 = "data" Then
Range("a" & i) = ""
End If
VALORE = IsNumeric(Range("b" & i))
If VALORE = True Then
Range("b" & i) = "data" & Range("b" & i)
End If
valore2 = Range("b" & i)
If valore2 = "data" Then
Range("b" & i) = ""
End If
VALORE = IsNumeric(Range("c" & i))
If VALORE = True Then
Range("c" & i) = "data" & Range("c" & i)
End If
valore2 = Range("c" & i)
If valore2 = "data" Then
Range("c" & i) = ""
End If
VALORE = IsNumeric(Range("d" & i))
If VALORE = True Then
Range("d" & i) = "data" & Range("d" & i)
End If
valore2 = Range("d" & i)
If valore2 = "data" Then
Range("d" & i) = ""
End If
Next i
Application.ScreenUpdating = True
|
Dim valore As Object
Set Area = Range("A1:d10")
For Each valore In Area
x = IsNumeric(valore)
If x = True Then
valore = "data" & valore
End If
If valore = "data" Then
valore = ""
End If
Next |
Dim CL As Object
For Each CL In Range("A1:B10")
If CL.Value = "data1" Then
CL.Font.ColorIndex = 3
ElseIf CL.Value = "data2" Then
CL.Font.ColorIndex = 3
ElseIf CL.Value = "data3" Then
CL.Font.ColorIndex = 3
End If
Next
|
Dim CL As Object
For Each CL In Range("A1:B10")
If CL.Value >= "dat*" Then
CL.Font.ColorIndex = 3
End If
Next
|
For i = 1 To 10
X = Mid(Range("A" & i), 1, 4)
y = Mid(Range("b" & i), 1, 4)
XX = Mid(Range("c" & i), 1, 4)
yy = Mid(Range("d" & i), 1, 4)
If X = "data" Then
Range("A" & i).Font.ColorIndex = 3
End If
If y = "data" Then
Range("b" & i).Font.ColorIndex = 3
End If
If XX = "data" Then
Range("c" & i).Font.ColorIndex = 3
End If
If yy = "data" Then
Range("d" & i).Font.ColorIndex = 3
End If
Next i
|
Application.ScreenUpdating = False
Dim valore As Object
Set Area = Range("D5:g28")
For Each valore In Area
X = IsNumeric(valore)
If X = True Then
valore = "data" & valore
End If
If valore = "data" Then
valore = ""
End If
Next
For i = 1 To 30
yy = Mid(Range("d" & i), 1, 4)
zz = Mid(Range("e" & i), 1, 4)
zx = Mid(Range("f" & i), 1, 4)
zy = Mid(Range("g" & i), 1, 4)
If yy = "data" Then
Range("d" & i).Font.ColorIndex = 3
End If
If zz = "data" Then
Range("e" & i).Font.ColorIndex = 3
End If
If zx = "data" Then
Range("f" & i).Font.ColorIndex = 3
End If
If zy = "data" Then
Range("g" & i).Font.ColorIndex = 3
End If
Next i
Application.ScreenUpdating = True
|
If valore = "0" Then valore = "PIPPO" & valore End If |
Application.ScreenUpdating = False
Dim valore As Object
Set Area = Range("D5:g28")
For Each valore In Area
If valore = "0" Then
valore = "PIPPO"
End If
X = IsNumeric(valore)
If X = True Then
valore = "data" & valore
End If
If valore = "data" Then
valore = ""
End If
Next
For i = 5 To 28
yy = Mid(Range("d" & i), 1, 4)
zz = Mid(Range("e" & i), 1, 4)
zx = Mid(Range("f" & i), 1, 4)
zy = Mid(Range("g" & i), 1, 4)
If yy = "data" Then
Range("d" & i).Font.ColorIndex = 3
End If
If zz = "data" Then
Range("e" & i).Font.ColorIndex = 3
End If
If zx = "data" Then
Range("f" & i).Font.ColorIndex = 3
End If
If zy = "data" Then
Range("g" & i).Font.ColorIndex = 3
End If
Next i
Application.ScreenUpdating = True
|
If valore = "0" Then valore = "PIPPO" End If |
