Macro to copy row into next blank row with condition

Estrella

New Member
Joined
Aug 3, 2012
Messages
17
headertestdetails
aalpha10
abeta400
bzoo32
bgamma500

<tbody>
</tbody>


Hello there,

I have this spreadsheet starting in A1 with a header row. Then I have another row in row 2 ( a-alpha-10 in my example ), then one empty row every two rows. ( so row a-beta-400 is row 4). The last row is not known but the number of rows will never be more than 200 rows.

I need to copy row 2 into row 3, them copy row 4 into row 5, then row 6 into row 7 etc etc.
Additionally I need a condition to change the value of cell A. For example if value in cell A2 is "a" I need the value to be changed into "z" when copying it into A3. If the value in A2 is "z" I need the value copied in A3 to become "a". These will be the only 2 values possible.

I have failed to make this think work so far! Any hints? Many thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,215,387
Messages
6,124,633
Members
449,177
Latest member
Sousanna Aristiadou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top