Difficult but not impossible

decent_boy

Board Regular
Joined
Dec 5, 2014
Messages
130
Office Version
  1. 2016
Platform
  1. Windows
Hello, hope that you are well

I need a macro for my result sheet , let me explain you that i have sheet1 and there are 3 fields from col a to c and i need a macro for result sheet which matches ID number from result sheet col a (where DI# is blank in col b) with sheet1 col a and copy/distribute b col value from sheet1 to result sheet in col c which must be equal d col value , ok please see below example in red highlighted font cells as a macro result.

Sheet1
IDEDI #Qty
A11A12452
A11A13451
A11A154510
A16B45673
A16B678930

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>

Result Sheet
IDDI#EDI #Qty
A11-A12452
A11-A13451
A11-A15451
A122345 1
A133245 1
A16-B45673
A16-B67892
A16-B67891

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
if need further explanation regarding to this can i explain if my question can not understand or it is not possible to be resolved.
 
Upvote 0
Can Someone please provide the solution if it can be resolved or not
 
Upvote 0
How do the quantities shown on Sheet1 relate to the quantities show on the Result sheet?

Why is B6789 repeated twice on the Result sheet?
 
Upvote 0
Thanks Rick for your reply please note that sheet1 is source data and by matching ID, result sheet is extracting data from sheet1 as per given Qty in sheet1 like if you see that result sheet example ID- A11 having Qty 2 and result sheet extracted EDI# which ID qty is 2 in sheet1 and after given 2 EDI # Qty is finished then it goes to next A11 where is qty is 1 and then it goes to next A11 where is qty is 10 but result sheet requirement is 1 in fourth row

Why is B6789 repeated twice on the Result sheet? sorry it is wrong entry
 
Upvote 0
So correct me if I'm wrong the EDI # value depend on the Qty of that ID right?

E.g:
Sheet1
IDEDI #Qty
A11A12452
A11A13451
A11A154510
A16B45673
A16B678930

<tbody>
</tbody>


Result Sheet
IDDI#EDI #Qty
A11-A12452
A11-A13451
A11-A15451
A1223451
A1332451
A16-B45673
A16-B67892
A16-B67891

<tbody>
</tbody>

so if the " 1" change to 2 , the A1545 will become A1345 right ?
 
Upvote 0
Can anybody please answer it ?
I would like to help, but quite frankly, I still do not understand the logic behind the construction of the Result Sheet. It seems that 'yesterdays' does, in fact, understand it; so, unless you can describe in more detail the link between your data and the Result Sheet, I think you are going to have to wait for him to come back on line and pick up where he left off.
 
Upvote 0
I would like to help, but quite frankly, I still do not understand the logic behind the construction of the Result Sheet. It seems that 'yesterdays' does, in fact, understand it; so, unless you can describe in more detail the link between your data and the Result Sheet, I think you are going to have to wait for him too come back on line and pick up where he left off.


Rick what you need to know more please ask I will explain but I give short example here suppose in sheet 1 in col a there are different and same name fruits and in column b their unique serial number and in column c fruits quantity
You are told to distribute these fruits in result sheet as per conditions.
Match fruit name with sheet
Give fruit (means copy EID #) from sheet 1 to result sheet as per given quantity of result sheet
once matching fruit quantity is ended in sheet 1 then go to next matching fruit name and copy data from their
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,541
Members
449,169
Latest member
mm424

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