Données dans une seule cellule

Bonjour,

j'ai ce code qui me donne les dates entre deux dates et j'aimerai bien avoir les données dans une seule cellule, maintenant j'ai les données l'un au dessous de l'autre.

Cordialement

Sub jrentredeux()

    Dim rng As Range
    Dim StartRng As Range
    Dim EndRng As Range
    Dim OutRng As Range
    Dim StartValue As Variant
    Dim EndValue As Variant
    xTitleId = "KutoolsforExcel"
    Set StartRng = Application.Selection
    Set StartRng = Application.InputBox("Start Range (single cell):", xTitleId, StartRng.Address, Type:=8)
    Set EndRng = Application.InputBox("End Range (single cell):", xTitleId, Type:=8)
    Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)
    Set OutRng = OutRng.Range("A1")
    StartValue = StartRng.Range("A1").Value
    EndValue = EndRng.Range("A1").Value
    If EndValue - StartValue <= 0 Then
        Exit Sub
        End If
        ColIndex = 0
        For i = StartValue To EndValue
            OutRng.Offset(ColIndex, 0) = i
            ColIndex = ColIndex + 1
        Next
End Sub

Salut,

Normalement, le code ci-joint devrait répondre à ta demande.

Cordialement.

4mappe1.xlsm (15.56 Ko)

Merci beaucoup, c'est exactement ce que je veux

Rechercher des sujets similaires à "donnees seule"