Bro,

Its not standard for 5rows. It's depends on  requirement. And I wrongly raised 
my query. Sorry.


-----Original Message-----
From: "Mandeep Baluja" <rockerna...@gmail.com>
Sent: ‎10-‎07-‎2015 02:48 PM
To: "excel-macros@googlegroups.com" <excel-macros@googlegroups.com>
Subject: Re: $$Excel-Macros$$ Re: FW: Automatically Generating Report - URGENT

Try once again. Or  paste this in sheet 3 and and run the macro result will 
come in sheet 2 okay 

S NOCODESLABLOCATIONTYPESTEP
1k01v1,2T,BNormal , SipSTEP - 1
2y02k1,2T,BNormal , SipSTEP - 2
3n01p2BSipSTEP - 3
4j55s1TNormalSTEP - 4







On Friday, July 10, 2015 at 2:37:17 PM UTC+5:30, pappu wrote:
Than of ur reply Bro, I am using excel 2010. In my company mail, ur attachment 
has not open. It's showing 'the file is corrupt and cannot opened'. 


From: Mandeep Baluja
Sent: ‎10-‎07-‎2015 01:44 PM
To: excel-...@googlegroups.com
Subject: $$Excel-Macros$$ Re: FW: Automatically Generating Report - URGENT


Regards, Mandeep Baluja 


Run this code output will receive in sheet2 and the criteria to get the result 
is pasted in sheet3. 


Sub Createdata()


Lc = Sheets("Sheet3").Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Sheet2").Cells.ClearContents


a = 5
b = 5


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)


lk = Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Debug.Print lk
If lk = 2 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 + b
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 + b
End If


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 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...@googlegroups.com.
To post to this group, send email to excel-...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

-- 
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.

-- 
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.

Reply via email to