![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 3
|
I have a list of days of the week in a column,with dates in the next column for a whole year.Between sun and mon is a blank row, and I want to move this to go between tues and wed. To many clicks etc for each individual week. Whats the macro I should use to automate this so it does the whole year?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Just to make sure, can you put some 10 rows of your data and the expected results ?
|
|
|
|
|
|
#3 | |
|
New Member
Join Date: Feb 2002
Posts: 3
|
Quote:
|
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
|
Do this instead:
Delete the contents of both columns, day and date. In the first cell of dates, type the first date you're using. Format the cell: Format-Cells-Number tab. Choose Date. Choose the one that gives you something like Friday, January 22, 2002 or whatever you like; there are ones that already show the days for you. Give yourself about 13 cells to start with. Select the last eight cells--a Wednesday through Tuesday and an additional blank cell beyond that. Now click and drag the fill handle (that little square black box at the bottom right-hand corner of your selection) and drag down as far as you want to go. Do NOT allow the cells to become deselected. Hit Copy. Hit Edit-Paste special-Values. Do you seriously need code now?
__________________
~Anne Troy |
|
|
|
|
|
#5 |
|
New Member
Join Date: Feb 2002
Posts: 3
|
sorry I can't do that as there is data in 4 other columns to the right of the days and date columns which has to remain with the correct date.
I have done this before using a macro with 'find, replace' but cannot remember how to do it again, and I dont have the original macro either. |
|
|
|
|
|
#6 | |
|
Guest
Posts: n/a
|
Quote:
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|