-----Original Message----- From: "KANNAN V" <kannan.ex...@gmail.com> Sent: 11-07-2015 09:26 AM To: "KANNAN V" <kannan.ex...@gmail.com>; "vt_kan...@camsonline.com" <vt_kan...@camsonline.com> Subject: RE: $$Excel-Macros$$ Re: FW: Automatically Generating Report - URGENT
Hi Bro, Really thanks for your effect, but its not working. Pls check below mentioned result. Now its working, But I am not asking this type. I will explain you now clearly, Example: 1. When "CODE" column have "k01v" means, we need only one row. (TOTAL ONE ROW) 2. Then "SLAB" column have "1" and "2" means, we need two rows. "1" for first row & "2" for second row. And scheme code also in two rows. (TOTAL TWO ROWS) 3. Then "LOCATION" column have T and B means, we need four rows. Because "SLAB" column already have two rows. So now we want to put "1" and "2" for "T" (two rows) and another "1" and "2" for "B" (two rows). (TOTAL FOUR ROWS) 4. Then "Type" column have Normal and SIP means, we need eight rows. Four rows for "NORMAL" and another four rows for "SIP". (TOTAL EIGHT ROWS) 5. Then " STEP" column have Step-1 means, we need same eight column only, Because there is only one "STEP-1". Requirement:- S NO CODE SLAB LOCATION TYPE STEP 1 k01v 1 & 2 T & B Normal & Sip STEP - 1 Result want to come mentioned below:- S NO CODE SLAB LOCATION TYPE STEP 1 k01v 1 T NORMAL STEP - 1 2 k01v 2 T NORMAL STEP - 1 3 k01v 1 B NORMAL STEP - 1 4 k01v 2 B NORMAL STEP - 1 1 k01v 1 T SIP STEP - 1 2 k01v 2 T SIP STEP - 1 3 k01v 1 B SIP STEP - 1 4 k01v 2 B SIP STEP - 1 From: KANNAN V Sent: 11-07-2015 08:23 AM To: vt_kan...@camsonline.com Subject: FW: $$Excel-Macros$$ Re: FW: Automatically Generating Report - URGENT From: Mandeep Baluja Sent: 10-07-2015 05:39 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Re: FW: Automatically Generating Report - URGENT Code Changed !! Try this Check this Out. Regards, Mandeep Baluja Email :-mandeep.bal...@snapdeal.com mandeep.bal...@gmail.com https://in.linkedin.com/pub/mandeep-baluja/88/7bb/b77 https://www.facebook.com/groups/825221420889809/ Sub Createdata() Lc = Sheets("Sheet3").Cells(Rows.Count, 1).End(xlUp).Row Sheets("Sheet2").Cells.ClearContents a = 1 b = 5 lk = Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Row For a1 = 2 To Lc v = Split(Sheets("Sheet3").Cells(a1, 3), ",") w = Split(Sheets("Sheet3").Cells(a1, 4), ",") x = Split(Sheets("Sheet3").Cells(a1, 5), ",") Sheets("sheet2").Select For i3 = LBound(x) To UBound(x) For i2 = LBound(w) To UBound(w) For i1 = LBound(v) To UBound(v) Debug.Print lk If lk = 1 Then Sheets("Sheet2").Range(Cells(1, 1), Cells(a, 1)).Value = Sheets("Sheet3").Cells(a1, 2).Value Sheets("Sheet2").Range(Cells(1, 2), Cells(a, 2)).Value = "SLAB - " & v(i1) Sheets("Sheet2").Range(Cells(1, 3), Cells(a, 3)).Value = "LOCATION - " & w(i2) Sheets("Sheet2").Range(Cells(1, 4), Cells(a, 4)).Value = x(i3) Sheets("Sheet2").Range(Cells(1, 5), Cells(a, 5)).Value = Sheets("Sheet3").Cells(a1, 2).Offset(0, 4).Value a = a + 1 Else Sheets("Sheet2").Range(Cells(lk, 1), Cells(a, 1)).Value = Sheets("Sheet3").Cells(a1, 2).Value Sheets("Sheet2").Range(Cells(lk, 2), Cells(a, 2)).Value = "SLAB -" & v(i1) Sheets("Sheet2").Range(Cells(lk, 3), Cells(a, 3)).Value = "LOCATION -" & w(i2) Sheets("Sheet2").Range(Cells(lk, 4), Cells(a, 4)).Value = x(i3) Sheets("Sheet2").Range(Cells(lk, 5), Cells(a, 5)).Value = Sheets("Sheet3").Cells(a1, 2).Offset(0, 4).Value a = a + 1 End If lk = Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Next Next Next Next End Sub -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 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) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible [The entire original message is not included.] -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 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) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.