Bill of Quantity - VBA

mdelandro

New Member
Joined
Mar 9, 2020
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
  2. MacOS
Hi All,

I am just starting to learn how to automise tasks by using VBA.
I have read many people recommending to learn by creating a need, so I guessed I might as well try to work on something that would actually be useful in my day to day life.
As I work in the construction industry, I often have to produce bill of quantities and estimates, however the formatting of this can often become tedious, repetitive and boring.
I have attached two screenshots from an example of a BOQ, one is the breakdown of all items, and the other is the summary of just the "Chapters". These can often contain many more lines than the one shown, and once I finish the estimate and have to modify the summary page, I always have to manually go and match the title in the summary to the chapters in the breakdown sheet. If its only 5-10 chapters this isn't too difficult, but doing it for 30, 40, 50 chapters, it can quickly become very boring.

Unfortunately, I've never programmed before and I'm finding myself a bit stuck in thinking of how to tackle this simple issue with VBA.

if anyone has any pointers, give me some ideas or examples, or even just tell me what I should be thinking about to get me started, that would be hugely appreciated!

Thank you

Mario
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi Mario, welcome to the board!
It is recommended that you include an example of your worksheet, preferably via xl2bb to give board members more insight on what you are trying to achieve.
 
Upvote 0
VBA BOQ.xlsx
ABCDEFGHI
1Project : VBA BOQ
2Title : VBA BOQ
3
4
5ItemDescriptionQuantityUnitRate (£)Total (£)
61Bill No. 01 : Preliminaries
7
81.1Document Preparation and Review
9QS - Estimating2.0day560.00100.00
101.2Site Supervision
11Engineer - setting out \ site visits20.0day560.00100.00
12Project Manager12.0day650.00100.00
13Site Supervisor120.0day400.00100.00
14H&S Supervisor8.0day560.00100.00
15Planner4.0day450.00100.00
161.3Plant Hire
17Tools & Equipment22.0week125.00100.00
18Digger & Dumper22.0week750.00100.00
19Carried to Summary£800.00
392Bill No. 02 : Excavations & Piles
40
412.1Enabling Works
42Excavate (assume 300mm) to form piling mat450.0m3100.00
43muckaway, assume non contaminated soil540.0m3100.00
442.1Pile mat
45Supply and install pile mate - assume 300mm compacted type 11500.0m2100.00
462.2Pile
47Assume 300mm diameter piles. Assumed depth 12m212.0item500.00100.00
48Pile cut off208.0item25.00100.00
49Carried to Summary£500.00
503Bill No. 03 : Bund
51
523.1RC for Bund
53Concrete 250.0m3175.00100.00
54Steel Reinforcement: (approx 150kg/m3)37.5m31250.00100.00
55Shuttering: Supply & Install430.0m245.00100.00
561200 Gauge Visqueen membrane - Supply & Install300.0m212.50100.00
57Visqueen - VX25150.0m12.50100.00
58Shingle50.0m330.00100.00
59150mm type 1 and 50mm blinding260.0m225.00100.00
603.2Structural Steel
61Galvanised structural steel 2.0ton2750.00100.00
6238x152mm rectangular moulded superspan phenolic grating260.0m2115.00100.00
633.3Ducting
64Excavation of cable pits5.0day750.00100.00
65Excavation of duct route3.0day750.00100.00
66Installation of cable ducting1.5day750.00100.00
67Reinstate1.0day750.00100.00
683.4Firewalls
69Firewalls - Supply and install300.0m2330.00
70Carried to Summary£1,300.00
714Bill No. 04 : Switchroom
72
734.1Switchroom Foundations
744.1.1Enabling Works
75Excavate by machine500.0m315.00100.00
76muckaway, assume non contaminated soil600.0m340.00100.00
774.1.2Beams
78Concrete - Supply and Pour70.0m3175.00100.00
79Formwork - Supply and install285.0m245.00100.00
804.1.3Retaining Walls and Slab
81Concrete - Supply and Pour137.0m3175.00100.00
82Formwork - Supply and install680.0m245.00100.00
83150mm type 1 plus 50mm blinding680.0m225.00100.00
844.1.4Membranes
85Visqueen 1500 tredguard350.0m28.50100.00
86Visqueen Gas Resistant Self Adhesive Membrane350.0m237.50100.00
87Visqueen - VX25 - Waterstops120.0m2.50100.00
88HP Tanking Primers20.0m212.50100.00
89Visqueen - VX90120.0m2.50100.00
904.1.5Steel Reinforcement
91Steel Reinforcement (approx 150kg/m3)24.0ton1250.00100.00
92Carried to Summary£1,300.00
935Bill No. 05 : Superstructure
94
955.1Structural Steel
96Galvanised steel - Supply and erect30.0tonne.2500.00100.00
97Allow for steel connections3.0tonne.2500.00100.00
985.2Slab
99Access Floor - Kingspan FDEB30 on zinc plated pedestals to suit floor height of 80040.0m3215.00100.00
100FLOORING - 43mm "dura slab moulded - light" solid top GRP flooring by dura composites with surface mounted fixings by dura composites to steel below.225.0m3125.00100.00
101300mm GEN3 concrete fill to store room with 1 layer A393 mesh in top cover3.0m3140.00100.00
1025.3Kingspan and cladding
103External Walls - 700mm thick KS100, supply and install484.0m2215.00100.00
104Roof - Kingspan 800mm thk KS100, supply and install350.0m2225.00100.00
1055.4Other
106afp airtech "SHX-UN10002 universal pressure vent4.0item250.00100.00
107afp airtech "DWL1000! Dynamic weather louvre15.0item75.00100.00
108Fire rated canister foam50.0m55.00100.00
1095.5Doors
110Door: 910x21004.0item1283.87
111Door: 910x24851.0item1787.37
112Door: 1135x24851.0item2152.30
113Door: 1810x30003.0item4369.64
1145.6WC and plumbing
115supply and fit, including tiles1.0item2500.00100.00
116Carried to Summary£1,100.00
Pricing
Cell Formulas
RangeFormula
F1:F2F1=Summary!G2
I19I19=SUM(I9:I18)
F43,F76F43=F42*1.2
I49I49=SUM(I42:I48)
I70I70=SUM(I52:I69)
I92I92=SUM(I73:I91)
I116I116=SUM(I95:I115)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I76Cell Value=0textYES
I60:I62Cell Value=0textYES
I114Cell Value=0textYES
I115Cell Value=0textYES
I113Cell Value=0textYES
I112Cell Value=0textYES
I111Cell Value=0textYES
I109Cell Value=0textYES
I110Cell Value=0textYES
I105Cell Value=0textYES
I106:I108Cell Value=0textYES
I101Cell Value=0textYES
I74Cell Value=0textYES
I75Cell Value=0textYES
I100Cell Value=0textYES
I99Cell Value=0textYES
I69Cell Value=0textYES
I68Cell Value=0textYES
I102Cell Value=0textYES
I98Cell Value=0textYES
I93:I97Cell Value=0textYES
I91Cell Value=0textYES
I91Cell Value=0textYES
I90Cell Value=0textYES
I48Cell Value=0textYES
I84:I86Cell Value=0textYES
I86Cell Value=0textYES
I85Cell Value=0textYES
I80Cell Value=0textYES
I81:I83Cell Value=0textYES
I77Cell Value=0textYES
I44Cell Value=0textYES
I89Cell Value=0textYES
I87Cell Value=0textYES
I88Cell Value=0textYES
I64Cell Value=0textYES
I65Cell Value=0textYES
I63Cell Value=0textYES
I66:I67,I92,I78:I79,I45:I47,I103:I104,I70:I73,I127:I65509,I1:I43,I49:I59,I116:I125Cell Value=0textYES
 
Upvote 0
VBA BOQ.xlsx
ABCDEFGHI
7
8SUMMARY
9
10ITEMDESCRIPTIONTotal (£)
11
12FIXED PRICE ELEMENTS (Labour & Material)
13
14
151Document Preparation and Review£800.00
16
172Bill No. 02 : Excavations & Piles£500.00
18
193Bill No. 03 : Bund£1,300.00
20
214Bill No. 04 : Switchroom£1,300.00
22
235Bill No. 05 : Superstructure£1,100.00
24
25
26
27
28TOTAL£5,000.00Plus VAT
29
Summary
Cell Formulas
RangeFormula
A15A15=+Pricing!A6
B15B15=+Pricing!B8
I15I15=+Pricing!I19
A17,A21A17=+A15+1
B17B17=+Pricing!B39
I17I17=+Pricing!I49
B19B19=+Pricing!B50
I19I19=+Pricing!I70
B21B21=+Pricing!B71
I21I21=+Pricing!I92
B23B23=+Pricing!B93
I23I23=+Pricing!I116
G28G28=+SUM(I15:I26)
 
Upvote 0
Do you use a template when making the estimates? If you did that and set up the summary in advance using the correct formulas, you would never have to type anything again. Whenever a row is inserted or deleted on the sheet with the specified BOQ (of course, the rows with chapter name and subtotal must remain intact) the formulas on the summary BOQ automatically adjust. VBA is then not necessary at all.
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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