Forum Discussion

BrelVictor's avatar
BrelVictor
Copper Contributor
Jun 27, 2022

help for a formula

Hello, I need help for a formula, I would like that in the NAME column of my table the A goes to the two rows below (Line 10 and 11) then that the B is automatically put in column 13 and thus to follow ... my table is 1000 lines and it is re-edited every month... I would like to automate the task. thank you for your help

  • BrelVictor 

    =IF(F10="",G9,F10)

    You could add an additional column and enter this formula in cell G10. In the example i entered "A" in cell G9 and copied the formula from cell G10 down. An alternative could be Power Query.

     

    • BrelVictor's avatar
      BrelVictor
      Copper Contributor

       

      OliverScheurich 

       Hello, thank you for your help but when I enter EXACTLY your formula, nothing happens... do you know why? 

      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        BrelVictor 

        From your screenshot i can't tell why it doesn't work. You can compare the attached file maybe this is helpful.

         

        An alternative could be these lines of code. In the attached file you can click the button in cell H2 to start the macro and the results are entered in column H.

        Sub filldown()
        
        Dim i As Double
        
        Cells(9, 7).Value = Cells(9, 6).Value
        For i = 10 To 1000
        
        If Cells(i, 6).Value = "" Then
        Cells(i, 7).Value = Cells(i - 1, 7).Value
        Else
        Cells(i, 7).Value = Cells(i, 6).Value
        
        End If
        
        Next i
        
        End Sub

         

Resources