Biggest Challenge For Excel Experts

Satya Ranjan

New Member
Joined
Dec 23, 2015
Messages
26
Capture.jpg


Each line is to be repeated by the nos of qty and in each line qty will be 1.


Is there any way we can do this in excel?

Thanks
 
Re: If you are not a super expert in excel then this question is not for you.

I guess one way would be....as long as quantities were consistent ......which is different to the other post you submitted

http://www.mrexcel.com/forum/excel-questions/930859-biggest-challenge-excel-experts.html

Select the Job required from column "A" then run the code...then select the next job...otherwise I can't see any logic to splitting them up.
Code:
Sub MM1()
Dim ans As Integer
ans = InputBox("please input qty amount for job !!")
counter = 1
With Sheets("Sheet3")
    Do While counter < ans + 1
    Selection.Copy Destination:=Range("E" & Rows.Count).End(xlUp).Offset(1)
    counter = counter + 1
    Loop
Range("G3:G" & Range("E" & Rows.Count).End(xlUp).Row).Value = 1
End With
End Sub
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Re: If you are not a super expert in excel then this question is not for you.

Hi Mr Satya,

Try below code this code useful to you.

as per your above explanation your qty column qty reflect 4 and a,b,c are copy and pasted 4 time. that means you need to how much qty in qty column you need to paste this job code that time

Sorry my bad english

Sub Multiple_Qty()
Dim lRow As Long
Dim RepeatFactor As Variant


lRow = 1
Do While (Cells(lRow, "A") <> "")

RepeatFactor = Cells(lRow, "CP")
If ((RepeatFactor > 1) And IsNumeric(RepeatFactor)) Then

Range(Cells(lRow, "A"), Cells(lRow, "D")).Copy
Range(Cells(lRow + 1, "A"), Cells(lRow + RepeatFactor - 1, "D")).Select
Selection.Insert Shift:=xlDown

lRow = lRow + RepeatFactor - 1
End If

lRow = lRow + 1
Loop
End Sub
 
Last edited:
Upvote 0
Re: If you are not a super expert in excel then this question is not for you.

You code doesn't collate it simply creates

Excel 2007
A
3a
4a
5a
6a
7b
8b
9b
10b
11c
12c
13c
14c
Sheet1
 
Last edited:
Upvote 0
Re: If you are not a super expert in excel then this question is not for you.

I have a question... how do we tell where on job ends and the next begins? I mean it is kind of obvious for the example you posted, but what if the price and quantity for the two jobs are the same, there would appear to be no way to tell the breakpoint between them from the data you posted.

Good Question! May be we can input a blank line in source data. If still problematic may be we can approach one by one.

I've given a better example on my next post, requesting you to follow the link and give your valuable solution there

Ref: http://www.mrexcel.com/forum/excel-...an-solve-problem-get-10-10-a.html#post4474654
 
Upvote 0
Re: If you are not a super expert in excel then this question is not for you.

Hi Mr Satya,

Try below code this code useful to you.

as per your above explanation your qty column qty reflect 4 and a,b,c are copy and pasted 4 time. that means you need to how much qty in qty column you need to paste this job code that time

Sorry my bad english

Sub Multiple_Qty()
Dim lRow As Long
Dim RepeatFactor As Variant


lRow = 1
Do While (Cells(lRow, "A") <> "")

RepeatFactor = Cells(lRow, "CP")
If ((RepeatFactor > 1) And IsNumeric(RepeatFactor)) Then

Range(Cells(lRow, "A"), Cells(lRow, "D")).Copy
Range(Cells(lRow + 1, "A"), Cells(lRow + RepeatFactor - 1, "D")).Select
Selection.Insert Shift:=xlDown

lRow = lRow + RepeatFactor - 1
End If

lRow = lRow + 1
Loop
End Sub


Pls give your expert suggestion for this expample
http://www.mrexcel.com/forum/excel-...an-solve-problem-get-10-10-a.html#post4474654
 
Upvote 0
Re: If you are not a super expert in excel then this question is not for you.

I guess one way would be....as long as quantities were consistent ......which is different to the other post you submitted

http://www.mrexcel.com/forum/excel-questions/930859-biggest-challenge-excel-experts.html

Select the Job required from column "A" then run the code...then select the next job...otherwise I can't see any logic to splitting them up.
Code:
Sub MM1()
Dim ans As Integer
ans = InputBox("please input qty amount for job !!")
counter = 1
With Sheets("Sheet3")
    Do While counter < ans + 1
    Selection.Copy Destination:=Range("E" & Rows.Count).End(xlUp).Offset(1)
    counter = counter + 1
    Loop
Range("G3:G" & Range("E" & Rows.Count).End(xlUp).Row).Value = 1
End With
End Sub


you are so kind and so helping. I am glad to have experts like you aside me.
pls give your solution for a better example on the below link
http://www.mrexcel.com/forum/excel-...an-solve-problem-get-10-10-a.html#post4474654
 
Upvote 0
Re: If you are not a super expert in excel then this question is not for you.

What will seperate job 1 from job 2,etc?
Will the qty's always be the same for each job, ie, A,B and C will always be the same Qty ??


may be we can put a blank row between two jobs or we can approach one by one job if not possible all at a time.
 
Upvote 0
Re: If you are not a super expert in excel then this question is not for you.

Dear Friends, Thank you for your suggestion. but still now my problem is not solved. This is may be insufficient of information in previous example.
requesting you to ignore all previous example and give your solution on basis of this example only.

This is the exact example of the case.

23uwgia.jpg
 
Upvote 0
Re: If you are not a super expert in excel then this question is not for you.

Dear Friends, Thank you for your suggestion. but still now my problem is not solved. This is may be insufficient of information in previous example.
requesting you to ignore all previous example and give your solution on basis of this example only.

This is the exact example of the case.

23uwgia.jpg

 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top