Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have a regular task that I do on a pivottable that looks like this (but longer): No Code Total 1 DN 841.92 PRP08 0 PRP30 0 2 RDB 0.00 RTQ 0.00 RVW 15,636.98 3 PRP42 3,435.76 Grand Total 672,328.19 I paste this info into a database which requires the number to be repeated on each line. At the moment I use a macro to copy the data down to the next entry as shown below starting in the cell that has No in: Selection.End(xlDown).Select Selection.End(xlDown).Select ActiveCell.Offset(-1, 0).Select Range(Selection, Selection.End(xlUp)).Select Selection.filldown and in the macro the above code is repeated 4 times and I keep repeating the macro until it gets near to the end of the list. Ideally I would like the macro to continue repeating the code above until it gets to the grand total row and then stop. I am sure this could be done using a "Do while" or similar statement. Could anyone help please? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
passing arguments from an excel macro to a word macro | Excel Discussion (Misc queries) | |||
Macro - Open Word with Excel macro | Excel Discussion (Misc queries) |