you do not need a macro
in sheet 2 in A2 copy paste this formula
and hit enter key.
I am assuming that there are less than 100 rows. see 100 in the above formula and also see the dollar signs in the formula
copy A2 in sheet 2 down as long as data is there and to the right till the column C