Hi Anwar,

Please run the below code and see if it works fine..

------------------------------

Sub conc_test()
Dim main_word As String
'cell_pointer = 0
lastrow = Sheets(1).Range("A2").End(xlDown).Row
counter = 3
While counter <= lastrow
Set present_cell = Range("E" & counter)
Set present_cell1 = Range("D" & counter)
word_suffix = ""
main_word = Range("D" & present_cell.Row) & Range("C" & present_cell.Row) &
Range("G" & present_cell.Row)
main_word1 = Range("D" & present_cell1.Row) & Range("C" & present_cell1.Row)
& Range("G" & present_cell1.Row)
cell_pointer = 0
While present_cell = present_cell.Offset(cell_pointer + 1, 0)
word_suffix = word_suffix & present_cell.Offset(cell_pointer + 1, 2)
cell_pointer = cell_pointer + 1
'counter = counter + cell_pointer
counter = counter + 1
While present_cell1 = present_cell1.Offset(cell_pointer, 0)
word_suffix = word_suffix & present_cell1.Offset(cell_pointer + 1, 3)
cell_pointer = cell_pointer + 1
'counter = counter + cell_pointer
counter = counter + 1
Wend
Wend
counter = counter + 1
Range("H" & present_cell.Row) = main_word & word_suffix
Range("H" & present_cell1.Row) = main_word1 & word_suffix
Wend

End Sub

--------------------------------------------

On Wed, Jul 20, 2011 at 8:16 PM, cma.ankur <ankurpande...@gmail.com> wrote:

> hi anwar,
> plz clarify ur query
>
> On Jul 19, 10:56 pm, john <jwa...@gmail.com> wrote:
> > I sorta see from the notes below the data what you are trying to do,
> > but the sample results do not seem to match the data.  ???  please
> > check it for correctness or explain further how you reached those
> > results
> >
> > On Jul 19, 5:26 am, Anwar Mohd <anr7no...@gmail.com> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi All,
> >
> > > Can any one help me with this.
> >
> > > Regards
> >
> > > Anr
> >
> > > ---------- Forwarded message ----------
> > > From: Anwar Mohd <anr7no...@gmail.com>
> > > Date: Mon, Jul 18, 2011 at 3:58 PM
> > > Subject: Need Formula or Macros
> > > To: excel-macros@googlegroups.com
> >
> > > Hi Experts,
> >
> > > I need formula or macro to concatenete the rows by mail id or reps.
> Attached
> > > the sample file.
> >
> > > Thanks in advance.
> >
> > > Regards
> >
> > > Anr
> >
> > >  Concatenate the rows based on the mail ID or reps.xlsx
> > > 13KViewDownload
>
> --
>
> ----------------------------------------------------------------------------------
> 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

Reply via email to