Consulting

Results 1 to 1 of 1

Thread: VBA code and VBA loop

  1. #1
    VBAX Newbie
    Joined
    Nov 2021
    Posts
    1
    Location

    VBA code and VBA loop

    Hello,testversion2.zip

    I'm stuck on this Excel file, could you help me please?

    2 problems:

    -1- On Filtre.sheet, I use the function FILTER to find which lines "S21.G00.78.006" (noted in C2 "Saisie".sheet) are in DSN.sheet column A. But it's not dynamic and it doesn't work well.
    I need the same result but with a VBA code in order to get the refresh in real time , but I don't know how to write it.

    -2-
    I need to copy Range("C172:C246") and insert/paste in DSN.sheet, Colum A , line 950 (the line is noted in C8 "Saisie".sheet)
    then Range("D172 D246") in DSN.sheet, and insert/paste in DSN.sheet, Colum A , in the line noted in D8 "Saisie".sheet)
    then Range("E172:E246") in DSN.sheet, noted in E8 "Saisie".sheet
    .....
    until empty

    I need to "extend" this VBA code to the colums next to then. And stopped when there are empty:

    Sub intégrationdansDSN()
    '
    ' intégrationdansDSN Macro
    '
     
    '
        Range("C172:C246").Select
        Selection.Copy
        Sheets("DSN").Select
        Range("A950").Select      ' A and the number of the line is in C8 saisie.sheet
        Selection.Insert Shift:=xlDown
        Application.CutCopyMode = False
        With Selection.Interior
            .Pattern = xlSolid
            .PatternColorIndex = xlAutomatic
            .Color = 65535
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
    End Sub
    THANKS A LOT in advance for your help.
    Last edited by Aussiebear; 11-20-2021 at 11:19 AM. Reason: Added code tags to supplied code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •