Importing rows from one sheet to another

braund

New Member
Joined
Jan 20, 2005
Messages
1
Is is possible to do the following:

I have one worksheet with column A (rows 1 - 31) listing dates in a month (i.e. Monday, January 3, 2005). Each date has 3 other columns listing other information.

I have 7 other worksheets labeled Monday through Sunday.

What I would to do is grab all rows for a particular day and place them into the corresponding "day" worksheet.

In essence, I would like to grab all Monday rows from the original worksheet and bring them over to the Monday worksheet.

Is this possible?? I am desperate to get this to work!

Thanks in advance!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Bruno

Active Member
Joined
Feb 17, 2002
Messages
491
Hi Braund,
Welcome to the board

A quick way could be :
In an extra column you enter the formula on row 1 :
= weekday(a1)

and copy this formula down to row 31
Now you can sort your list on this column, copy the day(s) you need and paste them into corresponding "day"-sheet
 

Bruno

Active Member
Joined
Feb 17, 2002
Messages
491
Or if you prefer a macro to do this automatically :
Code:
Sub SortWeekDays()
Dim MyRange As Range
Set MyRange = Sheets(1).Range("A1:A31")
For Each c In MyRange
    Select Case WorksheetFunction.WeekDay(c)
    Case 1   'sunday
        Range(c, Cells(c.Row, 3)).Copy _
        Worksheets("sunday").Range("A65536").End(xlUp).Offset(1, 0)
    Case 2   'monday
        Range(c, Cells(c.Row, 3)).Copy _
        Worksheets("monday").Range("A65536").End(xlUp).Offset(1, 0)
    Case 3   'tuesday
        Range(c, Cells(c.Row, 3)).Copy _
        Worksheets("tuesday").Range("A65536").End(xlUp).Offset(1, 0)
    Case 4   'wednesday
        Range(c, Cells(c.Row, 3)).Copy _
        Worksheets("wednesday").Range("A65536").End(xlUp).Offset(1, 0)
    Case 5   'thursday
        Range(c, Cells(c.Row, 3)).Copy _
        Worksheets("thursday").Range("A65536").End(xlUp).Offset(1, 0)
    Case 6   'friday
        Range(c, Cells(c.Row, 3)).Copy _
        Worksheets("friday").Range("A65536").End(xlUp).Offset(1, 0)
    Case 7   'saturday
        Range(c, Cells(c.Row, 3)).Copy _
        Worksheets("saturday").Range("A65536").End(xlUp).Offset(1, 0)
    End Select
Next
End Sub
 

Forum statistics

Threads
1,147,846
Messages
5,743,515
Members
423,801
Latest member
paulj4177

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
Top