Try this : its not a Good Macro but can Solve your Query : Sub bifurCateData()
Dim rngHeading As Range Dim RngData As Range Dim rngCell As Range Dim strCountryname As String Dim intLastrow As Integer With Range("A1") Set RngData = Intersect(.CurrentRegion, .CurrentRegion.Offset(1)) End With Set rngHeading = Range("A1").Resize(1, Range("A1").End(xlToRight).Column + 1) RngData.Sort Key1:=RngData.Cells(, RngData.Columns.Count) For IntI = ActiveSheet.UsedRange.Rows.Count To 3 Step -1 If Range("H" & IntI).Value <> Range("H" & IntI - 1).Value Then Range("H" & IntI).Resize(3, 1).EntireRow.Insert End If Next intLastrow = ActiveSheet.UsedRange.Rows.Count Range("A1").Activate lable1: ActiveCell.End(xlDown).Cells.Offset(2, 0).Select If ActiveCell.Row >= intLastrow Then Range("A1").Select Exit Sub End If ActiveCell.Value = ActiveCell.Offset(2, 7).Value ActiveCell.Offset(1, 0).Resize(1, 8).Value = rngHeading.Value GoTo lable1: End Sub On Thu, Oct 13, 2011 at 4:21 PM, Mr Excellent <suryaprasad...@gmail.com>wrote: > Hi Group, > > Please help > > Thanks > Prasad. > > ---------- Forwarded message ---------- > From: <suryaprasad...@gmail.com> > Date: Thu, Oct 13, 2011 at 10:43 AM > Subject: Fw: $$Excel-Macros$$ Help required > To: excel-macros@googlegroups.com > > > **Hi Guys can anyone help me on this please > > Thanks > Prasad > > Sent from BlackBerry® on Airtel > ------------------------------ > *From: *Mr Excellent <suryaprasad...@gmail.com> > *Sender: *excel-macros@googlegroups.com > *Date: *Thu, 13 Oct 2011 04:52:12 +0530 > *To: *<excel-macros@googlegroups.com> > *ReplyTo: *excel-macros@googlegroups.com > *Subject: *$$Excel-Macros$$ Help required > > Hi Group, > > Need a small help, i have a code which runs on the data and seggregates the > details as per the Country, but additional to that i require the Country > name should come on the top of each rows which are divided by country in the > first column and the heading should be applicable to all the seggregated > rows as per the country and should be bold and underlined. > > The example data is given in the first TAB "Tes" > My Code example data is given in the second TAB "My Code" > Actual required data is given in third TAB " Actual Required" > > Please help > > Thanks > Prasad. > > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- Regards Rajan verma +91 9158998701 -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel