VBA Create a sheet out of data

Jeeremy7

Board Regular
Joined
May 13, 2020
Messages
110
Office Version
  1. 365
Platform
  1. Windows
Hello,

I would like to create a sheet with certain code out of an other sheet with a lot of codes..
To explain it better I'll joint what I mean :LOL:

ESTIMATE LABOUR CODES.xlsm
ABCD
1Cost CodeDescriptionCost TypeBudgetAmount
201-0102Site SuperintendentLxxx
301-0122BondingOxxx
401-0131Courier costsSxxx
501-0135Liability Insurance .40 / KOxxx
601-0137Telephone/Data Oxxx
701-0145Builders Risk InsuranceOxxx
801-0166VehiclesOxxx
901-0171Meal allowances Mxxx
1001-0181AccommodationsMxxx
1101-0209ContainerMxxx
1201-0211ConsumablesMxxx
1301-5001Temporary washroomsMxxx
1401-5101Job site officesMxxx
1501-5113Temporary power hook upSxxx
1601-5201PrintingMxxx
1701-5611Temporary fencing (MAT)Mxxx
1801-5612Temporary fencing (LAB)Lxxx
1901-6011Winter heat (MAT)Mxxx
2001-5004Concrete testingSVCxxx
2102-4203Demolition dump feesSxxx
2202-7401Clean up (MAT)Mxxx
2302-7402Clean up (LAB)Lxxx
UPLOAD 1
Cell Formulas
RangeFormula
C2:C23C2=VLOOKUP(A2,'Cost Code Types'!A:C,3,FALSE)
Named Ranges
NameRefers ToCells
'Cost Code Types'!_FilterDatabase='Cost Code Types'!$A$1:$F$391C2:C23


So this is the sheet where all the codes would be


I would need to create something like that:

E20-084 ESTIMATE.xlsm
ABCDEF
11Cost CodeDescriptionBudgetSpentRemaining
12
1301General Requirements
1401.01.02Site Superintendentxxx
1501.56.12Temporary barricades (LAB)xxx
16
1702Demolition
1802.74.02Demolition (MAT)xxx
19
Labour Codes for SS
Cell Formulas
RangeFormula
B17B17=LEFT(B18,2)
C17C17=VLOOKUP(B17,'Estimate Worksheet'!$A$8:$B$1000,2,0)
Named Ranges
NameRefers ToCells
'Estimate Worksheet'!_FilterDatabase='Estimate Worksheet'!$A$67:$Z$1046C17


Techniquely all the labour codes (the ones that ends by .02) should be in this sheet

The problem I'm having is that it's not always regular
- Division 01 has 2 but division 02 only has 1 for example.

The division name would be taken of an other sheet with a VLOOKUP

I hope i made it clear enough if not let me know :)

Thanks a lot for whoever will take the time !
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,429
Messages
6,124,842
Members
449,193
Latest member
MikeVol

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