Curtisyoung78
New Member
- Joined
- Jun 19, 2017
- Messages
- 25
Hi I am new here and have a question regarding VBA coding. I am building a spreadsheet and I would like to be able to use VBA Code to bold the differences between sheet 2 and sheet 1. It is a steel pile schedule where each sheet is a revision and the changes to each revision needs to be bolded and a thick border placed around rows (non consecutive rows, column A to R) containing bolded cells, and when rows with bolded cells are consecutive there needs to be bold border above top row (row that contains bolded cell) and thick border below bottom row (row that contains bolded cell) this emphasizes the changes in the new revision. The range is A12 to Q:2000)
I currently am able to bold the differences using conditional formatting but would rather automate the full process for better accuracy and efficiency.
My goal is to do all this with a VBA code and assign to a button or have it update automatically if possible. Can someone please help with the VBA code this would really speed up the process. This is quite a bit to ask but I'm just starting to learn VBA and this would really be an excellent learning experience, thanks in advance for any help.
See below for an example.
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 2323"]
<colgroup><col><col><col><col><col><col><col><col span="3"><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]P6067[/TD]
[TD]TYPE 1[/TD]
[TD]273[/TD]
[TD]9.3[/TD]
[TD]11.0[/TD]
[TD]12.0[/TD]
[TD]100.400[/TD]
[TD]121.620[/TD]
[TD]92.070[/TD]
[TD][/TD]
[TD]FLARE K.O. DRUM (601V-100)[/TD]
[TD="colspan: 4"][/TD]
[TD]150[/TD]
[TD]20[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6068[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]112.460[/TD]
[TD]103.945[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6004[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6069[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]112.460[/TD]
[TD]100.505[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6004[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6070[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]113.000[/TD]
[TD]89.420[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6005[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6071[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]113.000[/TD]
[TD]87.420[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6005[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]
P6072[/TD]
[TD]
TYPE 4[/TD]
[TD]
273[/TD]
[TD]THICK BORDER HERE
9.3[/TD]
[TD] (BELOW CELLS ARE BOLDED BECAUSE THEY WERE ADDED IN REV1, ABOVE REV 0 INFO CARRIED OVER)
10.0[/TD]
[TD]
11.0[/TD]
[TD]
99.575[/TD]
[TD]
39.000[/TD]
[TD]
40.000[/TD]
[TD] [/TD]
[TD]LIGHT STANDARD[/TD]
[TD="colspan: 4"] [/TD]
[TD]140[/TD]
[TD]15[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]P6073[/TD]
[TD]TYPE 4[/TD]
[TD]273[/TD]
[TD]9.3[/TD]
[TD]10.0[/TD]
[TD]11.0[/TD]
[TD]100.215[/TD]
[TD]107.000[/TD]
[TD]41.000[/TD]
[TD][/TD]
[TD]LIGHT STANDARD[/TD]
[TD="colspan: 4"][/TD]
[TD]140[/TD]
[TD]15[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]P6074[/TD]
[TD]TYPE 4[/TD]
[TD]273[/TD]
[TD]9.3[/TD]
[TD]10.0[/TD]
[TD]11.0[/TD]
[TD]99.900[/TD]
[TD]149.500[/TD]
[TD]51.700
[/TD]
[TD] [/TD]
[TD]LIGHT STANDARD[/TD]
[TD="colspan: 4"] [/TD]
[TD]140[/TD]
[TD]15[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>THICK BORDER HERE
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I currently am able to bold the differences using conditional formatting but would rather automate the full process for better accuracy and efficiency.
My goal is to do all this with a VBA code and assign to a button or have it update automatically if possible. Can someone please help with the VBA code this would really speed up the process. This is quite a bit to ask but I'm just starting to learn VBA and this would really be an excellent learning experience, thanks in advance for any help.
See below for an example.
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 2323"]
<colgroup><col><col><col><col><col><col><col><col span="3"><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]P6067[/TD]
[TD]TYPE 1[/TD]
[TD]273[/TD]
[TD]9.3[/TD]
[TD]11.0[/TD]
[TD]12.0[/TD]
[TD]100.400[/TD]
[TD]121.620[/TD]
[TD]92.070[/TD]
[TD][/TD]
[TD]FLARE K.O. DRUM (601V-100)[/TD]
[TD="colspan: 4"][/TD]
[TD]150[/TD]
[TD]20[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6068[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]112.460[/TD]
[TD]103.945[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6004[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6069[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]112.460[/TD]
[TD]100.505[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6004[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6070[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]113.000[/TD]
[TD]89.420[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6005[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]P6071[/TD]
[TD]TYPE 1[/TD]
[TD]219[/TD]
[TD]8.2[/TD]
[TD]9.0[/TD]
[TD]10.0[/TD]
[TD]100.200[/TD]
[TD]113.000[/TD]
[TD]87.420[/TD]
[TD][/TD]
[TD]PIPE SUPPORT PS-6005[/TD]
[TD="colspan: 4"][/TD]
[TD]80[/TD]
[TD]8[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]
P6072[/TD]
[TD]
TYPE 4[/TD]
[TD]
273[/TD]
[TD]THICK BORDER HERE
9.3[/TD]
[TD] (BELOW CELLS ARE BOLDED BECAUSE THEY WERE ADDED IN REV1, ABOVE REV 0 INFO CARRIED OVER)
10.0[/TD]
[TD]
11.0[/TD]
[TD]
99.575[/TD]
[TD]
39.000[/TD]
[TD]
40.000[/TD]
[TD] [/TD]
[TD]LIGHT STANDARD[/TD]
[TD="colspan: 4"] [/TD]
[TD]140[/TD]
[TD]15[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]P6073[/TD]
[TD]TYPE 4[/TD]
[TD]273[/TD]
[TD]9.3[/TD]
[TD]10.0[/TD]
[TD]11.0[/TD]
[TD]100.215[/TD]
[TD]107.000[/TD]
[TD]41.000[/TD]
[TD][/TD]
[TD]LIGHT STANDARD[/TD]
[TD="colspan: 4"][/TD]
[TD]140[/TD]
[TD]15[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]P6074[/TD]
[TD]TYPE 4[/TD]
[TD]273[/TD]
[TD]9.3[/TD]
[TD]10.0[/TD]
[TD]11.0[/TD]
[TD]99.900[/TD]
[TD]149.500[/TD]
[TD]51.700
[/TD]
[TD] [/TD]
[TD]LIGHT STANDARD[/TD]
[TD="colspan: 4"] [/TD]
[TD]140[/TD]
[TD]15[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>THICK BORDER HERE
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]