Bonsoir,Bonjour,
J'ai une feuille avec une quantité de cellules qui possède plusieurs lignes a l'intérieur de ces cellules. Il y a 4 lignes a chaque fois. J'aimerais mettre chaque ligne dans une nouvelle cellule.
Merci par avance pour votre aide.
Sub Split_txt()
Range("B1") = Range("A1")
Range("B1").Replace what:=Chr(10), replacement:=Chr(32)
Range("B1").TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
Space:=True, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1))
End Sub
A+Sub Split_txt()
Range("B1") = Range("A1")
Range("B1").Replace what:=Chr(10), replacement:=Chr(46)
Range("B1").TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
Other:=True, OtherChar:=".", _
FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1))
End Sub
=SI(COLONNE()-2>(NBCAR($A1)-NBCAR(SUBSTITUE($A1;CAR(10);"")));"";
STXT($A1;TROUVE("µ";SUBSTITUE(SUBSTITUE(CAR(10)&$A1&CAR(10);CAR(10);
"µ";COLONNE()-1);CAR(10);"¤";COLONNE()-1));TROUVE("¤";SUBSTITUE(SUBSTITUE(
CAR(10)&$A1&CAR(10);CAR(10);"µ";COLONNE()-1);CAR(10);"¤";COLONNE()-1))-
TROUVE("µ";SUBSTITUE(SUBSTITUE(CAR(10)&$A1&CAR(10);CAR(10);"µ";
COLONNE()-1);CAR(10);"¤";COLONNE()-1))-1))