Its working well

Thanx!!

On Thu, Jul 5, 2012 at 7:12 PM, NOORAIN ANSARI <noorain.ans...@gmail.com>wrote:

> Dear Deepak,
>
> Please use below code...
>
> Sub N_spilit_Worksheet()
> Dim i As Long
> Dim k As Long
> Dim j As Long
> Dim rng As Range
> Dim sh As Worksheet
> On Error Resume Next
> Set sh = ThisWorkbook.Worksheets(1)
> With sh
>  Set rng = .Range("C2:C" & .Range("C" & Rows.Count).End(xlUp).Row)
>     rng.Copy .Cells(1, "W")
>       .Range("W1:W" & .Range("w" &
> Rows.Count).End(xlUp).Row).RemoveDuplicates 1
>         j = .Cells(Rows.Count, "W").End(xlUp).Row
>             For i = 1 To j
>                 Sheets.Add after:=Sheets(Sheets.Count)
>                     Sheets(Sheets.Count).Name = .Cells(i, "W")
>                          .Range("A1:M1").AutoFilter field:=3,
> Criteria1:=.Cells(i, "w"), VisibleDropDown:=False
>                          .Range("A1:M" & .Cells(Rows.Count,
> "M").End(xlUp).Row).Copy Sheets(Sheets.Count).Cells(1, 1)
>
> 'Selection.Cells.SpecialCells(xlCellTypeVisible).Copy
> Sheets(Sheets.Count).Cells(1, 1)
>                          Sheets(Sheets.Count).Columns.AutoFit
>                          sh.Range("A1:M1").AutoFilter
>             Next i
> End With
> On Error GoTo 0
> End sub
>
>
> See attached sheet...Hope it help to you
> --
> Thanks & regards,
> Noorain Ansari
> www.noorainansari.com
> www.excelmacroworld.blogspot.com
>
> On Thu, Jul 5, 2012 at 6:56 PM, Deepak Rawat <deepakexce...@gmail.com>wrote:
>
>> Hi,
>>
>> I want a macro for attached sheet
>> what i need exactly
>> I have a consolidated data of muliple city. I want to make diiferent
>> sheets citywise and shteet name should be of city.
>>
>> Regards,
>> Deepak Rawat
>>
>> --
>> 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
>>
>> To unsubscribe, send a blank email to
>> excel-macros+unsubscr...@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
>
> To unsubscribe, send a blank email to
> excel-macros+unsubscr...@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

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com

Reply via email to