VBA needed

Branagorn

New Member
Joined
Apr 13, 2015
Messages
41
Please allow me to create a new thread, I think I overcomplicated the original.

I have a spreadsheet with 4 sheets within it. 1-Coversheet,2-Original BoM,3-New BoM, 4-Dashboard


The user will enter some information on the Coversheet, then copy and paste some table information into both the original BoM and New BoM tabs. This ends the user inputs, other than perhaps clicking a box to run the following.

I have no idea how to write VBA, but I'm pretty sure it required to perform what I need.


I need it to,

1. Look at the sheet called 'Original BoM' and the table held there (needs to be a table as this tool will work for different systems of different sizes).

2. Taking data from this table, it should write into a new table held in a sheet labelled 'Dashboard'. This table starts in C17 to G17 (headers C16-G17),

Original IDMaster ID ListUp to Date IDNomenclaturePart Description

<tbody>
</tbody>


taking the data from the 'original BoM' sheet, it should

a)concatenate 3 things, (a value held in a sheet called 'Coversheet' in cell $C$2) &(the value in the A column) & (the value held in the B column), and write this in the Dashboard Original ID (column C) & in the Master ID (Column D) List.
b)place the value in the c column in the Dashboard F column.
c)place the value in the d column in the Dashboard G column.
d)repeat a-c down the table in the original BoM sheet until there stops being data (the entire row of data will be valid providing there is a number held in the B Column, if there is text it is not valid).

3.

Repeat step 2, but for the 'New BoM tab', this data is written in the same table as step 2, perhaps underneath it? But note that for step a) the concatenated values will be written into the Master ID (Column D) and Up to Date ID (Column E).

4. The table will most likely now contain duplicate rows, i.e two instances of the same Master ID (column D). One instance of these duplicates needs to be removed, and re-write the remaining row to show the ID is valid for both the original and up to date. i.e

Original IDMaster ID ListUp to Date IDNomenclaturePart Description
511VSB2200770000356

<tbody>
</tbody><colgroup><col></colgroup>
511VSB2200770000356

<tbody>
</tbody><colgroup><col></colgroup>
Placething
511VSB2200770000111511VSB2200770000111otherplaceotherthing
511VSB2200770000356511VSB2200770000356Placething

<tbody>
</tbody>

becomes

Original IDMaster ID ListUp to Date IDNomenclaturePart Description
511VSB2200770000111511VSB2200770000111otherplaceotherthing
511VSB2200770000356511VSB2200770000356511VSB2200770000356Placething

<tbody>
</tbody>

5. The table should now have no duplicate instances of the Master ID now, but the final step should be to resort the table based on the last 8 digits of the Master ID list, finally looking something like this.

Original IDMaster ID ListUp to Date IDNomenclaturePart Description
123ABC1234500000001123ABC1234500000001123ABC1234500000001placescrew
123ABC1234500000003123ABC1234500000003123ABC1234500000003otherplacescrew
123ABC1234500000004123ABC1234500000004australiabolt
123ABC1234500000009123ABC1234500000009themoonthing
123ABC1234500000020123ABC1234500000020thatplacething
123ABC1234500000100123ABC1234500000100neverlandthing
123ABC1234500000999123ABC1234500000999123ABC1234500000999nowhereplank
123ABC1234500123456123ABC1234500123456themoongoose
123ABC1234500123457123ABC1234500123457somewhereduck

<tbody>
</tbody>
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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