Excel - Macro

Asked By j-marc
21-Nov-09 07:29 AM
http://cjoint.com/?lvnAbzi5HB


Merci
LvnAbzi5HB
(1)
Cell.Value
(1)
Essaie
(1)
Essai
(1)
Bien
(1)
Tres
(1)
Toto
(1)
  Daniel.C replied to j-marc
21-Nov-09 07:54 AM
Bonjour.
Essaie :

Sub essai()
Dim cell As Range
For Each cell In Range("E1", [E10000].End(xlUp))
If cell.Value = "toto" Then
Range("G10").Copy cell
End If
Next
End Sub

Daniel
  j-marc replied to Daniel.C
21-Nov-09 10:08 AM
Merci Daniel ca fonctionne tres bien
Create New Account
help
macro for a workbook: Sub addspace() Dim cell As Object For Each cell In Selection cell.Value = " " & cell.Value cell.Value = Right(cell.Value, Len(cell.Value) - 1) Next End Sub It worked perfectly the first time I used
of code to tell the difference between a number and a letter, for example if cell.value = cell.value.text (a letter or group of letters) then copy info into col a elseif cell.value = cell.value.number (a number or group of numbers) then copy info into col b end if
concatenate cell.value Excel I am trying to concatenate 2 values (for instance new value in cell D4 I get an error message 13 with this code: For Each cell In Columns(4) cell.Value = cell.Value & cell.Offset(0, -1).Value Next Any idea? thanks - - caroline Excel Programming Discussions Microsoft Excel You had Value which is a number and excel does not like AND (&) a number. cell.Value = cell.Text & cell.Offset(0, -1).Text Try something like: Sub caroline() For Each cell
to replace two values in my sheet: Public Sub Replace_Y_With_Rate5() For Each cell In Selection cell.Value = Replace(cell.Value, "Y", "24", 1, 1, vbTextCompare) cell.Value = Replace(cell.Value, "CP", "8", 1, 1, vbTextCompare) Next cell End Sub I am wondering if I could