Macro to Create new cell data from 2 sources

Deaneric

New Member
Joined
Nov 17, 2017
Messages
3
Not sure if I can word this correctly but here goes....

I have a worksheet with hundreds of different "master codes" with descriptions and costs from one of our furniture suppliers.

What i need is to create a worksheet with the master code having the finish code adding to the end i.e. master code = QWRL.BL, finish code could one of 17 finishes for e.g. .AN .SL etc.

So i would need the code QWRL.BL to go onto a new worksheet with the finish adding to the code i.e. QWRL.BL would become QWRL.BL.AN and then QWRL.BL.SL and so on, once the 17 have been created the next master code would follow suit.

Is this possible?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hello Deaneric,

It is very doable. Can you post about 5 master codes and 5 finish codes?
 
Upvote 0
here is the code I used:

Code:
Sub Do_it()

'data in cells A2 thru C*
'finish codes in G2 thru G*
'new data written to K2 thru M*


Application.ScreenUpdating = False
Range("K2:M1048576").ClearContents

For r = 2 To Cells(Rows.Count, "A").End(xlUp).Row
For g = 2 To Cells(Rows.Count, "G").End(xlUp).Row

wr = Cells(Rows.Count, "K").End(xlUp).Row + 1

Cells(wr, "K") = Cells(r, "A") & "." & Cells(g, "G")
Cells(wr, "L") = Cells(r, "B")
Cells(wr, "M") = Cells(r, "C")

Next g
Next r

Application.ScreenUpdating = True
End Sub


Ive uploaded a sample file at :
http://www.computermaninc.net/Merge Codes.xlsm


Hth,

Ross
 
Upvote 0
Hi - Thanks for the reply, I have test worksheet i can send to you, can't seem to see an upload function on here?
 
Upvote 0

Forum statistics

Threads
1,215,731
Messages
6,126,537
Members
449,316
Latest member
sravya

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