Using Excel 2016

I have a column with cells value is either 1 or empty / 0 in this sheet called "Data".

I want to loop through individual cell from e.g. starting from B4 to B50 to check the value (either 1 or empty).

If value is 1,
then copy the cell content on the left (A & number of row that has value 1) to another sheet called "Main" starting from "B2".
While copying, it need to check the cell (B2) is empty, if not, check next B3, B4 and paste to next empty cell.
Pasting into cell should retain the format of the words (e.g. Bold,italic,colour if there is) that is copying from.
Then return to "Data" sheet and resume checking next cell (B5) for value 1. Loop until B50.

if value is 0
then skip to next cell down and check again until B50.


Appreciate using excel 2016 VBA. I tried a few type of codes but remain error.

Private sub commandbutton1_click()
Dim sh1 As worksheet, sh2 As Worksheet
Dim i As Long

Set Sh1 = Sheets("Main")
Set sh2 = Sheets("DATA")

for i = 1 to Rows.Count
If sh2.Cells(2, i).value = 1 Then
sh2.Cells(1, i).copy
Sh1.range("B2").paste
End if

i = i + 1
Next i

End sub