Dear Mukesh,

Can you provide that worksheet, where macro is not running...
Please share workbook with group..
On Tue, Jan 31, 2012 at 7:17 PM, Mukesh Kumar <mukeshka...@gmail.com> wrote:

> Thanks Noorain Ansari Ji for the solution but it works is working with
> this sheet only i.e if the column headings are having two same titles.
> If I have to transform three or four columns to first three or four
> columns then this macro will not work there. Please suggest any
> formula or user form according to variable number of columns titles.
>
>
> Waiting for the reply.
>
>
> Regards,
> Mukesh kumar
>
> On 1/31/12, NOORAIN ANSARI <noorain.ans...@gmail.com> wrote:
> > Dear Mukesh,
> >
> > Please try it.. and see attached sheet.
> >
> > Sub mukesh()
> > Dim i, c, j As Integer
> > c = Application.WorksheetFunction.CountA(Sheet1.Range("1:1"))
> > Sheet2.Range("A1:B1") = Array("Name", "No")
> > counter = 2
> > For j = 2 To c Step 2
> > For i = 2 To Sheet1.Cells(Rows.Count, j).End(xlUp).Row
> > Sheet2.Cells(counter, 1).Value = Sheet1.Cells(i, j - 1)
> > Sheet2.Cells(counter, 2).Value = Sheet1.Cells(i, j)
> > counter = counter + 1
> > Next i
> > Next j
> > Sheet2.Columns.AutoFit
> > Sheet2.Activate
> > End Sub
> >
> >
> > On Tue, Jan 31, 2012 at 1:10 PM, Mukesh Kumar <mukeshka...@gmail.com>
> wrote:
> >
> >> Dear Sir,
> >>
> >> Please tell me the solution for the query given in the attached file.
> >> In it the data is distributed in the different columns. The solution
> >> is manually copy paste the data which is time consuming process.
> >> Please tell me the solution or formula to automate the process. Also
> >> please note that here two columns are having label i.e. Name & No.
> >> There may be certain time the columns may having more than 2 or more
> >> labels. So please keep this situation too in mind.
> >>
> >>
> >> Thanks & Regards,
> >> Mukesh Kumar
> >>
> >> --
> >> 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
> >>
> >
> >
> >
> > --
> > Thanks & regards,
> > Noorain Ansari
> > *http://excelmacroworld.blogspot.com/*<
> http://excelmacroworld.blogspot.com/>
> > *http://noorain-ansari.blogspot.com/* <
> http://noorain-ansari.blogspot.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
> >
>
> --
> 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
>



-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/>
*http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.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

Reply via email to