'Incremental autofill in googlesheet

I want to make a table with every 3rd row from the datasource.

1st cell: =TRIM(RIGHT(SUBSTITUTE($B1," ",REPT(" ",20)),20))
2nd cell: =TRIM(RIGHT(SUBSTITUTE($B4," ",REPT(" ",20)),20))
3rd cell: =TRIM(RIGHT(SUBSTITUTE($B7," ",REPT(" ",20)),20))
...

I want cells to be auto filled with this pattern {B1,B4,B7,B10,B13..1+3x}

But when I select first three cells and try autofill, the spreadsheet does this

1st cell: =TRIM(RIGHT(SUBSTITUTE($B1," ",REPT(" ",20)),20))
2nd cell: =TRIM(RIGHT(SUBSTITUTE($B4," ",REPT(" ",20)),20))
3rd cell: =TRIM(RIGHT(SUBSTITUTE($B3," ",REPT(" ",20)),20))
4th cell: =TRIM(RIGHT(SUBSTITUTE($B4," ",REPT(" ",20)),20))
5th cell: =TRIM(RIGHT(SUBSTITUTE($B7," ",REPT(" ",20)),20))
6th cell: =TRIM(RIGHT(SUBSTITUTE($B6," ",REPT(" ",20)),20))
...

How do I achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source