Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 Macro to move data around worksheet
I need to convert data for the three columns below by repeating these
steps. Insert blank row at A1 Move contents of C2 to A1 Make A1 bold and underlined. Move to next row in column C where data is different from date that was moved in step above. Repeat loop until end of data in column is reached. A B C 1 Bk 2662, Pg 153 1509056 Abstract of Inventory 2 Bk 2125, Pg 749 1509059 Affidavit of Deimmobilization 3 Bk 2661, Pg 780 1508959 Affidavit Of Lost Notes 4 Bk 661, Pg 875 1508995 Affidavit Of Lost Notes 5 Bk 2661, Pg 878 1508996 Affidavit Of Lost Notes 6 Bk 2661, Pg 883 1508998 Affidavit Of Lost Notes 7 Bk 2662, Pg 11 1509019 Affidavit Of Lost Notes 8 Bk 2662, Pg 14 1509020 Affidavit Of Lost Notes 9 Bk 2662, Pg 18 1509021 Affidavit Of Lost Notes 10 Bk 2662, Pg 103 1509046 Affidavit Of Lost Notes 11 Bk 2662, Pg 64 1509037 Affidavit of Substantial Complete 12 Bk 2125, Pg 676 1508988 Articles of Organization 13 Bk 159, Pg 581 1508988 Articles of Organization 14 Bk 2125, Pg 647 1508973 Assignment & Bill of Sale 15 Bk 2661, Pg 902 1509001 Assignment of Mortgage Note 16 Bk 2661, Pg 835 1508974 Certificate of Substantial Complete 17 Bk 2125, Pg 739 1509057 Convey Interest This is what finished sheet should look like. A B 1 Abstract of Inventory 2 Bk 2662, Pg 153 1509056 3 Affidavit of Deimmobilization 4 Bk 2125, Pg 749 1509059 5 Affidavit Of Lost Notes 6 Bk 2661, Pg 780 1508959 7 Bk 2661, Pg 875 1508995 8 Bk 2661, Pg 878 1508996 9 Bk 2661, Pg 883 1508998 10 Bk 2662, Pg 11 1509019 11 Bk 2662, Pg 14 1509020 12 Bk 2662, Pg 18 1509021 13 Bk 2662, Pg 103 1509046 14 Affidavit of Substantial Complete 15 Bk 2662, Pg 64 1509037 16 Articles of Organization 17 Bk 2125, Pg 676 1508988 18 Bk 159, Pg 581 1508988 19 Assignment & Bill of Sale 20 Bk 2125, Pg 647 1508973 21 Assignment of Mortgage Note 22 Bk 2661, Pg 902 1509001 23 Certificate of Substantial Complete 24 Bk 2661, Pg 835 1508974 25 Convey Interest Bk 2125, Pg 739 1509057 Your help would be greatly appreciated. I have tried several times but can't make it work. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 Macro to move data around worksheet
Test on a copy of your workbook
Sub moveStuff() Const columnA = "A" Const columnC = "C" Dim lastRow As Long Dim i As Long Range(columnA & 1).EntireRow.Insert lastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row * 2 For i = 2 To lastRow Range(columnA & i).Offset(-1, 0) = Range(columnC & i) Range(columnC & i) = "" Range(columnA & i).Offset(1, 0).EntireRow.Insert i = i + 1 Next i End Sub "recorder" wrote: I need to convert data for the three columns below by repeating these steps. Insert blank row at A1 Move contents of C2 to A1 Make A1 bold and underlined. Move to next row in column C where data is different from date that was moved in step above. Repeat loop until end of data in column is reached. A B C 1 Bk 2662, Pg 153 1509056 Abstract of Inventory 2 Bk 2125, Pg 749 1509059 Affidavit of Deimmobilization 3 Bk 2661, Pg 780 1508959 Affidavit Of Lost Notes 4 Bk 661, Pg 875 1508995 Affidavit Of Lost Notes 5 Bk 2661, Pg 878 1508996 Affidavit Of Lost Notes 6 Bk 2661, Pg 883 1508998 Affidavit Of Lost Notes 7 Bk 2662, Pg 11 1509019 Affidavit Of Lost Notes 8 Bk 2662, Pg 14 1509020 Affidavit Of Lost Notes 9 Bk 2662, Pg 18 1509021 Affidavit Of Lost Notes 10 Bk 2662, Pg 103 1509046 Affidavit Of Lost Notes 11 Bk 2662, Pg 64 1509037 Affidavit of Substantial Complete 12 Bk 2125, Pg 676 1508988 Articles of Organization 13 Bk 159, Pg 581 1508988 Articles of Organization 14 Bk 2125, Pg 647 1508973 Assignment & Bill of Sale 15 Bk 2661, Pg 902 1509001 Assignment of Mortgage Note 16 Bk 2661, Pg 835 1508974 Certificate of Substantial Complete 17 Bk 2125, Pg 739 1509057 Convey Interest This is what finished sheet should look like. A B 1 Abstract of Inventory 2 Bk 2662, Pg 153 1509056 3 Affidavit of Deimmobilization 4 Bk 2125, Pg 749 1509059 5 Affidavit Of Lost Notes 6 Bk 2661, Pg 780 1508959 7 Bk 2661, Pg 875 1508995 8 Bk 2661, Pg 878 1508996 9 Bk 2661, Pg 883 1508998 10 Bk 2662, Pg 11 1509019 11 Bk 2662, Pg 14 1509020 12 Bk 2662, Pg 18 1509021 13 Bk 2662, Pg 103 1509046 14 Affidavit of Substantial Complete 15 Bk 2662, Pg 64 1509037 16 Articles of Organization 17 Bk 2125, Pg 676 1508988 18 Bk 159, Pg 581 1508988 19 Assignment & Bill of Sale 20 Bk 2125, Pg 647 1508973 21 Assignment of Mortgage Note 22 Bk 2661, Pg 902 1509001 23 Certificate of Substantial Complete 24 Bk 2661, Pg 835 1508974 25 Convey Interest Bk 2125, Pg 739 1509057 Your help would be greatly appreciated. I have tried several times but can't make it work. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to move sheet tabs to the side of the worksheet in excel 2003 | Excel Discussion (Misc queries) | |||
Macro to Move Specific Data to Another Worksheet | Excel Worksheet Functions | |||
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 | Excel Worksheet Functions | |||
How do you move names and data between large Excel 2003 workbooks? | Excel Worksheet Functions | |||
Converting Lotus 123 macro to Excel - copy/move data to worksheet | Excel Programming |