And if you still insist :)

Sub Consolidator()

    Dim col As New Collection
    Dim lngRow As Long
    Dim strSheetName As String

    For lngRow = Sheets.Count To 1 Step -1
        Application.DisplayAlerts = 0
        If Sheets(lngRow).Name <> "Jan1Rake" Then 'ActiveSheet.Name Then
            Sheets(lngRow).Delete
        End If
        Application.DisplayAlerts = 1
    Next
    strSheetName = ActiveSheet.Name
    For lngRow = 3 To Cells(Rows.Count, 1).End(xlUp).Row
        If Cells(lngRow, "D").Value <> "" Then
            On Error Resume Next
            col.Add Cells(lngRow, "D").Value, Cells(lngRow, "D").Value
            Err.Clear: On Error GoTo 0
        End If
    Next lngRow

    For lngRow = 1 To col.Count
        Worksheets(strSheetName).Range("A2:K" &
Worksheets(strSheetName).Cells(Rows.Count, 1).End(xlUp).Row).AutoFilter 4,
col.Item(lngRow)
        With Worksheets.Add(After:=Sheets(Sheets.Count))
            .Name = col.Item(lngRow)
            Worksheets(strSheetName).Range("A2:K" &
Worksheets(strSheetName).Cells(Rows.Count, 1).End(xlUp).Row).Copy .Cells(1)
        End With
    Next lngRow
    Worksheets(strSheetName).AutoFilterMode = 0

End Sub

Regards,

Sam Mathai Chacko

On Tue, Jan 31, 2012 at 7:58 PM, dguillett1 <dguille...@gmail.com> wrote:

>   I suggest you NOT do that. Instead delete the blanks and use
> data>filter>autofilter>filter as desired.
>
> Don Guillett
> SalesAid Software
> dguille...@gmail.com
>
>  *From:* raghu gr <balaji.bra...@gmail.com>
> *Sent:* Tuesday, January 31, 2012 8:04 AM
> *To:* excel-macros@googlegroups.com
> *Subject:* $$Excel-Macros$$
>
> Hi,
>
> In customer data base i want to copy each customer details in each page.
>
> mean to say - i want Ramu details in Page2 (3 rows),  Bhaskar details in
> page3, Shannu details in page 4 and so on.
>
> how to do this using vba, pls help regarding this
>
> Attached sample file,
>
> Thank you
> Balaji
>
>
>
> --
> FORUM RULES (986+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>
> --
> FORUM RULES (986+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>



-- 
Sam Mathai Chacko

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to