Related:
- Macro: copy and paste
- Spell number in excel without macro - Guide
- Macro excel download - Download - Spreadsheets
- Excel macro to create new sheet based on value in cells - Guide
- Run macro on opening workbook - Guide
- Excel vba assign macro to button programmatically - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 27, 2009 at 10:36 PM
Oct 27, 2009 at 10:36 PM
A40 to A60 are 21 rows where as A61 to A80 are 20 rows and also A81 to A100 are 20 rows. To void inconsistency I have made the first set A41 to A60
in that case use this macro
in that case use this macro
Sub test() Dim j As Integer, k As Integer For j = 1 To 31 k = (j + 1) * 20 'MsgBox k Cells(j, "A").Copy Range(Cells(k + 1, "A"), Cells(k + 20, "A")).PasteSpecial Next j End Sub
Oct 28, 2009 at 03:07 AM
Regards,
Dee