End of column text vba

ash59

New Member
Joined
Jul 29, 2021
Messages
10
Office Version
  1. 2016
Platform
  1. Windows
I have an convoluted macro that takes 3 columns of info from one sheet, rearranges it on the same sheet, cuts it and then dumps into another sheet. I am not that confident with VBA so the second sheet has a straight copy from the first, including 3 columns down to row 671. The problem that I have is that the written data could be anything from 5 rows to 671. If it is less than 671 ctrl end goes to row 671 even though there is no written data in it. How do I set the spreadsheet, via vba, so that ctrl end goes to the end of the written data?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Welcome to the Board!

You could try going to the end of one the columns, and doing a CTRL+Up Arrow from there.
In VBA code, it would look like the following (for column A):
VBA Code:
lastRow = Cells(Rows.Count,"A").End(xlUp).Row
 
Upvote 0
Welcome to the Board!

You could try going to the end of one the columns, and doing a CTRL+Up Arrow from there.
In VBA code, it would look like the following (for column A):
VBA Code:
lastRow = Cells(Rows.Count,"A").End(xlUp).Row
Thanks, tried that manually but Ctrl up takes me to the top of the column, not the to the bottom of the text so if the vba matches the manual method, then it will not work either. Need to some how find the blanks and delete them but not sure how to define them when the number of rows can vary.
 
Upvote 0
Thanks, tried that manually but Ctrl up takes me to the top of the column, not the to the bottom of the text so if the vba matches the manual method, then it will not work either. Need to some how find the blanks and delete them but not sure how to define them when the number of rows can vary.
The annoying thing is that if you took a new spreadsheet, entered info to A1 to A10 and the copied A1 to A20 to another row, Ctrl down works perfectly and takes you to the last text entry.
 
Upvote 0
Thanks, tried that manually but Ctrl up takes me to the top of the column, not the to the bottom of the text so if the vba matches the manual method, then it will not work either. Need to some how find the blanks and delete them but not sure how to define them when the number of rows can vary.
The only way I know that would happen is if the entirety of column A is blank (except maybe for row 1), or it is full (formula or formatting applied to every single row in column A).

Are any of these situations going on?

Or perhaps you are running this at the wrong time or against the wrong sheet, and there is no data in column A at the point this code is being run.
You should be able to verify this by stepping through your code as you watch what is happening to the sheets at that point of the code.
 
Upvote 0
The only way I know that would happen is if the entirety of column A is blank (except maybe for row 1), or it is full (formula or formatting applied to every single row in column A).

Are any of these situations going on?

Or perhaps you are running this at the wrong time or against the wrong sheet, and there is no data in column A at the point this code is being run.
You should be able to verify this by stepping through your code as you watch what is happening to the sheets at that point of the code.
Thanks again for the reply. I have the sheet in front of me. There is written info in cells C1 to C344. If, on C1, I ctrl down, it goes to C691. If I go ctrl up from here, it goes to C1. There are no formulas and the format is set to general.

1961 G F Gordon 202108.xlsm
CDE
125kg Ordinary Portland CementOPC099B3.54
225Kg Sulphate Resisting Cement - Paper BagsOPC001LSR4.6
325Kg WHITE Ordinary Portland Cement - Paper BagsOPC001W7.34
425kg Extra Rapid Cement - Plastic BagsOPC001RER13.49
520Kg Bag of Postmix ProfessionalOPC001PCP4.77
625kg SikaLevel 25 Latex Self LevellingEV-SKLEV25LAT2514.96
725kg Bag GP Non-Shrink GroutNSG259.52
8BLACK MACADAM 25KG25MAC5.88
9Instarmac 6mm road repair 25kg Tubs (Green Lid)INST6MAC20.15
1025kg Bags of Granite 6mm - DustDUST0023.74
11Joint Filling Agg 1- 4mm - 25kg (Grey)GRIT36.02
12Bag Of Kiln Dried Sand KDSAND2.21
1325Kg Bagged Aggregate - 10MM SHINGLE25SHIN102.11
1425Kg Bagged Aggregate - 20MM ALL IN BALLAST25BALLAST2.11
1525kg Bagged Aggregate - 20mm Shingle25SHING202.11
1625Kg Bagged Aggregate - BUILDING SAND25BSAND2.11
1725Kg Bagged Aggregate - SHARP WASHED SAND25SSAND2.11
1825Kg Bagged Aggregate - Type 125TYPE12.4
19BULK BAG 2 - 6MM GRIT6MMGRIT69.19
20Bulk Bag Aggregate - 10MM SHINGLESHIN142.3
21Bulk Bag Aggregate - 20MM SHINGLESHIN242.3
22Bulk Bag Aggregate - BALLAST 20mmBALLAST42.3
23Bulk Bag Aggregate - BUILDING SANDBSAND42.3
24Bulk Bag Aggregate - SHARP WASHED SANDWSAND42.3
25Bulk Bag Aggregate - TYPE1TYPE142.3
26Bulk Bag of TopsoilTOPSOIL62.99
27125mm x 255mm Half Battered (HB2) Straight Kerb 914mmKRB0015.51
28125mm x 255mm Half Battered (HB2) External Radius - 1 MetreKRB0359.07
29125mm x 255mm Half Battered (HB2) External Radius - 2 MetreKRB0369.07
30125mm x 255mm Half Battered (HB2) Internal Radius - 2 MetreKRB0799.07
31125mm x 255mm Half Battered (HB2) External Radius - 3 MetreKRB0379.07
32125mm x 255mm Half Battered (HB2) Internal Radius - 3 MetreKRB0459.15
33125mm x 255mm Half Battered (HB2) External Radius - 4 MetreKRB0389.15
34125mm x 255mm Half Battered (HB2) Internal Radius - 4 MetreKRB0469.15
35125mm x 255mm Half Battered (HB2) External Radius - 5 MetreKRB1179.15
36125mm x 255mm Half Battered (HB2) External Radius - 6 MetreKRB0399.15
37125mm x 255mm Half Battered (HB2) Internal Radius - 6 MetreKRB0479.07
38125mm x 255mm Half Battered (HB2) External Radius - 8 MetreKRB0409.07
39125mm x 255mm Half Battered (HB2) Internal Radius - 8 MetreKRB0489.07
40125mm x 255mm Half Battered (HB2) External Radius - 10 MetreKRB0429.07
41125mm x 255mm Half Battered (HB2) Internal Radius - 10 MetreKRB0809.07
42125mm x 255mm Half Battered (HB2) External Radius - 15 MetreKRB0439.07
43125mm x 255mm Half Battered (HB2) Internal Radius - 15 MetreKRB0819.07
44125mm x 255mm Half Battered (HB2) to Bullnosed 150mm (BN3) Dropper - Left Hand DL1KRB0159.07
45125mm x 255mm Half Battered (HB2) to Bullnosed 150mm (BN3) Dropper - Right Hand DR1KRB0149.07
46125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Left Hand - 4 Metre DL1KRB05919.24
47125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Right Hand - 4 Metre DR1KRB06019.24
48125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Left Hand - 6 Metre DL1KRB06119.24
49125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Right Hand - 6 Metre DR1KRB06219.24
50125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Left Hand - 8 Metre DL1KRB07719.24
51125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Right Hand - 8 Metre DR1KRB06319.24
52125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Left Hand - 10 Metre DL1KRB06519.24
53125mm x 255mm/150mm Half Battered (HB2) to Bullnosed (BN3) Radius Dropper Right Hand - 10 Metre DR1KRB06419.24
54125mm x 255mm Half Battered (HB2) Angle - External HBXAKRB02117.34
55125mm x 255mm Half Battered (HB2) Angle - Internal HBIAKRB02017.34
56305mm x 255mm Half Battered (HB2) Quadrant QHBKRB02618.65
57455mm x 255mm Half Battered (HB2) Quadrant QHBKRB02721.79
58125mm x 255mm Bullnosed (BN2) Straight Kerb 914mmKRB0055.44
59125mm x 255mm Bullnose (BN2) External Radius - 1 MetreKRB2429.07
60125mm x 255mm Bullnosed (BN2) External Radius - 2 MetreKRB0499.07
61125mm x 255mm Bullnosed (BN2) External Radius - 3 MetreKRB0509.07
62125mm x 255mm Bullnosed (BN2) External Radius - 4 MetreKRB0519.07
63125mm x 255mm Bullnosed (BN2) External Radius - 5 Metre KRB2289.07
64125mm x 255mm Bullnosed (BN2) External Radius - 6 MetreKRB0529.07
65125mm x 255mm Bullnosed (BN2) External Radius - 8 MetreKRB0539.07
66125mm x 255mm Bulllnosed (BN2) External Radius - 10 MetreKRB0559.07
67125mm x 255mm *Bullnosed* (BN2) to Bullnosed 150mm (BN3) Dropper - Left HandKRB0169.07
68125mm x 255mm *Bullnosed* (BN2) to Bullnosed 150mm (BN3) Dropper - Right HandKRB0179.07
69125mm x 255mm Bullnosed (BNIA) Angle - InternalKRB02218.65
70125mm x 255mm Bullnosed (BNXA) Angle - ExternalKRB02318.65
71305mm x 255mm Bullnosed (BN) Quadrant QBNKRB02818.65
72125mm x 255mm Bullnosed (BN2) to Half Battered (HB2) Transition Kerb - Right HandKRB00718.6
73125mm x 255mm Half Battered (HB2) to Bullnose (BN2) Transition Kerb - Left HandKRB00618.6
74125mm x 150mm Bullnosed (BN3) Straight 914mmKRB0124.53
75125mm x 150mm Bullnosed (BN3) External Radius - 1 MetreKRB065A7.44
76125mm x 150mm Bullnosed (BN3) External Radius - 2 MetreKRB0667.44
77125mm x 150mm Bullnosed (BN3) External Radius - 3 MetreKRB0847.44
78125mm x 150mm Bullnosed (BN3) Internal Radius - 3 MetreKRB0717.44
79125mm x 150mm Bullnosed (BN3) External Radius - 4 MetreKRB0677.44
80125mm x 150mm Bullnosed (BN3) Internal Radius - 4 MetreKRB2317.44
81125mm x 150mm Bullnosed (BN3) External Radius - 5 MetreKRB067A7.44
82125mm x 150mm Bullnosed (BN3) External Radius - 6 MetreKRB0687.44
83125mm x 150mm Bullnosed (BN3) Internal Radius - 6 MetreKRB2337.44
84125mm x 150mm Bullnosed (BN3) External Radius - 8 MetreKRB0697.44
85125mm x 150mm Bullnosed (BN3) Internal Radius - 8 MetreKRB2347.44
86125mm x 150mm Bullnosed (BN3) External Radius - 10 MetreKRB0707.44
87125mm x 150mm Bullnosed (BN3) Internal Radius - 10 Metre KRB1067.44
88125mm x 150mm Bullnosed (BN3) External Radius - 15 MetreKRB070A7.44
89125mm x 255mm Half Battered (LH) to Splay Transition Kerb (RH)KRB00818.6
90125mm x 255mm Half Battered (RH) to Splay Transition Kerb (LH)KRB07618.6
91125mm x 255mm Splayed (SP2) Straight Kerb 914mmKRB0045.44
92125mm x 255mm/150mm Splayed (SP2) to Bullnosed (BN3) Dropper - Left HandKRB01810.49
93125mm x 255mm/150mm Splayed (SP2) to Bullnosed (BN3) Dropper - Right HandKRB01910.49
94125mm x 150mm Square Channel CS2KRB0104.62
95125mm x 255mm Dished ChannelKRB01110
96125mm x 255mm Square Channel CS1KRB0096.18
9750mm x 150mm x 914mm Path Edging - ****** Bullnosed EBN ******KRB0292.17
9850mm x 150mm x 914mm Path Edging - Flat Top EFKRB0302.18
9950mm x 205mm* x 914mm Path Edging - Flat Top EFKRB0325.68
10050mm x 255mm** x 914mm Path Edging - Flat Top EFKRB0336.27
101600mm x 600mm x 50mm Natural Grey Paving B50PAV0824.76
102750mm x 600mm x 50mm Natural Grey Paving C50PAV0836.05
103900mm x 600mm x 50mm Natural Grey Paving D50PAV0845.99
104400mm x 400mm x 50mm Chamferred Edge Natural Grey PavingPAV0873.57
105400 x 400 x 50mm Cycleway Paving - Buff (Sq Edge Lines)PAV202CB6.279
106400 x 400 x 50mm Cycleway Paving - Natural (Sq Edge Lines)PAV201CN5.397
107400mm x 400mm x 50mm Hazard Corduroy Paving - BuffPAV2045.7645
108400mm x 400mm x 50mm Hazard Corduroy Paving - NaturalPAV2035.817
109400mm x 400mm x 50mm Tactile Blister Paving - BuffPAV0775.7225
110400mm x 400mm x 50mm Tactile Blister Paving - RedPAV0765.67
111400mm x 400mm x 65mm Tactile Blister Paving - BuffPAV077F8.6625
112450mm x 450mm x 50mm Natural Grey Paving - Square EdgedPAV0794.7145
113450mm x 450mm x 50mm Tactile Blister Paving - BuffPAV0789.7965
114450mm x 450mm x 50mm Tactile Blister Paving - RedPAV078R9.7965
115900mm Diameter x 250mm High Concrete Chamber Ring - NO STEPSCMB12152.27
116900mm Diameter x 500mm High Concrete Chamber Ring - NO STEPSCMB12278.02
117900mm Diameter x 750mm High Concrete Chamber Ring - NO STEPSCMB12378.02
118900mm Diameter x 1000mm High Concrete Chamber Ring - NO STEPSCMB124104.03
119900mm Diameter Heavy Duty Cover Slab - 600mm x 600mm AccessCMB12595.79
1201050mm Diameter x 250mm High Concrete Chamber Ring - Including Double StepsCMB12659.61
1211050mm Diameter x 500mm High Concrete Chamber Ring - Including Double StepsCMB12778.95
1221050mm Diameter x 750mm High Concrete Chamber Ring - Including Double StepsCMB129103.27
1231050mm Diameter x 1000mm High Concrete Chamber Ring - Including Double StepsCMB130125.91
1241050mm Diameter Heavy Duty Cover Slab - 600mm x 600mm AccessCMB13195.04
1251200mm Diameter x 250mm High Concrete Chamber Ring - Including Double StepsCMB13269.52
1261200mm Diameter x 500mm High Concrete Chamber Ring - Including Double StepsCMB13395.38
1271200mm Diameter x 750mm High Concrete Chamber Ring - Including Double StepsCMB134119.31
1281200mm Diameter x 1000mm High Concrete Chamber Ring - Including Double StepsCMB135164.73
1291200mm Diameter Heavy Duty Cover Slab - 600mm x 600mm AccessCMB136125.34
1301200mm Diameter Heavy Duty Cover Slab - 675mm x 675mm AccessCMB136B125.34
1311200mm Diameter Heavy Duty Cover Slab - 750mm x 600mm AccessCMB136A125.34
1321350mm Diameter x 500mm High Concrete Chamber Ring - Including Double StepsCMB145143.25
1331350mm Diameter x 750mm High Concrete Chamber Ring - Including Double StepsCMB146186.22
1341350mm Diameter x 1000mm High Concrete Chamber Ring - Including Double StepsCMB147248.28
1351350mm Diameter Heavy Duty Cover Slab - 600mm x 600mm AccessCMB148202.93
1361350mm Diameter Heavy Duty Cover Slab - 675mm x 675mm AccessCMB148B202.93
1371350mm Diameter Heavy Duty Cover Slab - 750mm x 600mm AccessCMB148A202.93
1381500mm Diameter x 500mm High Concrete Chamber Ring - Including Double StepsCMB137160.95
1391500mm Diameter x 750mm High Concrete Chamber Ring - Including Double StepsCMB138205.31
1401500mm Diameter x 1000mm High Concrete Chamber Ring - Including Double StepsCMB139255.45
1411500mm Diameter Heavy Duty Cover Slab - 600mm x 600mm AccessCMB140248.28
1421500mm Diameter Heavy Duty Cover Slab - 675mm x 675mm AccessCMB140675248.28
1431500mm Diameter Heavy Duty Cover Slab - 750mm x 600mm AccessCMB140A257.84
1441800mm Diameter x 500mm High Concrete Chamber Ring - Including Double StepsCMB175204.13
1451800mm Diameter x 750mm High Concrete Chamber Ring - Including Double StepsCMB176261.42
1461800mm Diameter x 1000mm High Concrete Chamber Ring - Including Double StepsCMB177349.76
1471800mm Diameter Heavy Duty Cover Slab - 600mm x 600mm AccessCMB179315.13
148375mm Diameter x 750mm Deep x 150mm Outlet Concrete Road Gully GUL14453.13
149450mm Diameter x 750mm Deep x 150mm Outlet Concrete Road GullyGUL14554.91
150450mm Diameter x 900mm Deep x 150mm Outlet Concrete Road GullyGUL14657.3
151450mm Diameter x 1050mm Deep x 150mm Outlet Concrete Road GullyGUL14760.56
152Naylor Gully Connection pipe 160mm dia x 25mNPGULLYCON1125.55
153600mm x 450mm x 150mm Concrete Rectangular Inspection Chamber SectionDIC14914.78
154600mm x 450mm x 225mm Concrete Rectangular Inspection Chamber SectionDIC15019.93
155750mm x 600mm x 150mm Concrete Rectangular Inspection Chamber SectionDIC15422.74
156750mm x 600mm x 225mm Concrete Rectangular Inspection Chamber SectionDIC15526.22
157750mm x 600mm Light Duty Concrete Cover Slab - 600mm x 450mm AccessDIC15631.14
1581000mm x 675mm x 150mm Concrete Rectangular Inspection Chamber SectionDIC15830.68
1591000mm x 675mm x 225mm Concrete Rectangular Inspection Chamber SectionDIC15935.88
1601000mm x 675mm Light Duty Concrete Cover Slab - 600mm x 450mm AccessDIC16053.06
1611200mm x 750mm x 150mm Concrete Rectangular Inspection Chamber SectionDIC16237.82
1621200mm x 750mm x 225mm Concrete Rectangular Inspection Chamber SectionDIC162/50.6
1631200mm x 750mm Light Duty Concrete Cover Slab - 600mm x 600mm AccessDIC16578.46
1641200mm x 750mm Heavy Duty Concrete Cover Slab - 600mm x 600mm AccessDIC166153.22
165Caswick Galv Double Encapsulated Step IronSS40211.95
166600mm POLO Precast TYPE 2 Concrete Seating RingsSEAT6024.99
167600mm Type 1 Square Precast Concrete Seating Rings - Eccentric SEAT60E32.15
168675mm Square Precast Concrete Seating RingsSEAT6722.77
169750 x 600mm Precast Concrete Seating RingsSEAT7524.99
170750mm x 650mm x 100mm square Gully raising Slab - 450mm Dia AccessGUL14921.66
171U Shaped Gully Raising Piece, 100m DeepGUL15421.66
172610x100x12mm SHIMPAC SHIMP122.21
173610x100x24mm SHIMPACSHIMP244.36
174610x100x36mm SHIMPACSHIMP366.39
175200mm x 100mm x 60mm Omega Block Paving - BrindleOM60BR15.13
176200mm x 100mm x 60mm Omega Block Paving - CharcoalOM60CL15.13
177450mm x 450mm x 32mm Bradstone Peak Riven Paving - BuffPEAK45B2.31
178450mm x 450mm x 32mm Bradstone Peak Riven Paving -*Natural *PEAK45N2.31
179600mm x 600mm x 32mm Bradstone Peak Riven Paving - BuffPEAK60B4.81
180600mm x 600mm x 32mm Bradstone Peak Riven Paving - *Natural*PEAK60N5.05
181450mm x 450mm x 32mm Bradstone Textured Paving - BuffTEXT45B4.03
182450mm x 450mm x 32mm Bradstone Textured Paving - *Natural*TEXT45N4.03
183600mm x 600mm x 35mm Bradstone Textured Paving - BuffTEXT60B7.19
184600mm x 600mm x 35mm Bradstone Textured Paving - *Natural*TEXT60N7.19
185450mm x 450mm x 32mm Chaucer Paving - BuffCHAU0017.19
186BOX 225mm Stainless Steel Type 4 Housing Ties BBA and Part E Type A (250 per box)VE4-225-STST30.23
187BOX 250mm Stainless Steel Type 4 Housing Ties BBA and Part E Type A (250 Per Box)VE4-250-STST41.47
188100mm Wide x 30 Metre Roll Polythene Damp Proof CourseDPC1002.29
189150mm Wide x 30 Metre Roll Polythene Damp Proof CourseDPC1503.43
190225mm Wide x 30 Metre Roll Polythene Damp Proof CourseDPC2255.42
191300mm Wide x 30 Metre Roll Polythene Damp Proof CourseDPC3007.22
192450mm Wide x 30 Metre Roll Polythene Damp Proof CourseDPC45010.82
193600mm Wide x 30 Metre Roll Polythene Damp Proof CourseDPC60014.42
194900mm Wide X 30 Metre Roll Polythene Damp Proof CourseDPC90021.64
1954 Metre Wide x 25 Metre Roll 300MU Polythene Damp Proof MembraneDPM30040.14
1964 Metre Wide x 12.5 Metre Roll 500MU Polythene Damp Proof MembraneDPM50038.23
197Builders Black PVC Tape 100x33mtrEV1116.94
198Telescopic Void Vent12012.1
199Vertical Extension Piece (To Suit Telescopic Vent)12042.32
2009" x 3" UPVC Airbrick - Black1201ABBL0.62
2019" x 3" UPVC Airbrick - Buff 1201ABBU0.51
2029" x 3" UPVC Airbrick - Terracotta 1201ABTC0.51
203Timloc BUFF Weep VentsTIM1143B0.48
204Timloc RED Weep VentsTIM1143R0.47
205Timloc Concealed Wall Weep Vent NaturalTW1CL0.47
206100 x 65 x 600mm Long Prestressed Concrete LintelPSCL6002.42
207100 x 65 x 750mm Long Prestressed Concrete LintelPSCL7503.01
208100 x 65 x 900mm Long Prestressed Concrete LintelPSCL9003.61
209100 x 65 x 1200mm Long Prestressed Concrete LintelPSCL12004.82
210140 x 65 x 600mm Long Prestressed Concrete LintelPSCL6001403.61
211140 x 65 x 900mm Long Prestressed Concrete LintelPSCL9001405.42
21225mm Diameter x 100 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM18052.92
21325mm Diameter x 25 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM17817.01
21425mm Diameter x 50 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM17926.46
21532mm Diameter x 25 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM19728.35
21632mm Diameter x 50 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM19846.62
21732mm Diameter x 100 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM181.85.05
21850mm Diameter x 50 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM199102.98
21963mm Diameter x 50 Metre Blue Medium Density Polyethylene (MDPE) Water PipeWTM201166.42
22094mm (I.D) x 110mm (O.D.) 6m Length Twinwall Duct c/w Coupling - Orange "SL"2908512.8
22194mm (I.D) x 110mm (O.D.) x 6 Metre Length Twinwall Ducting c/w Coupling - BLACK2912012.8
22294mm (I.D) x 110mm (O.D.) x 6 Metre Length Twinwall Ducting c/w Coupling - BLUE2911012.8
22394mm (I.D) x 110mm (O.D.) x 6 Metre Length Twinwall Ducting c/w Coupling - GREEN2928112.8
22494mm (I.D) x 110mm (O.D.) x 6 Metre Length Twinwall Ducting c/w Coupling - PURPLE2904312.8
22594mm (I.D) x 110mm (O.D.) x 6 Metre Length Twinwall Ducting c/w Coupling - YELLOW2904512.8
22694mm (I.D) x 110mm (O.D.) x 6m Length Twinwall Duct c/w Coupling - Orange "TS"2908412.8
22794mm/110mm Diameter Twinwall Duct Coupling2922512.8
22894mm (I.D) x 110mm (O.D.) Twinwall Duct Bend - 11.25 Degree291448.48
22994mm (I.D) x 110mm (O.D.) Twinwall Duct Bend - 22.5 Degree291418.48
23094mm (I.D) x 110mm (O.D.) Twinwall Duct Bend - 45 Degree291388.48
23194mm (I.D) x 110mm (O.D.) Twinwall Duct Bend - 90 Degree291498.48
232125mm x 6m Ridgiduct RB125 c/w Coupler (ENATS)RB12522.79
233125mm Black RB125 R-Duct Coupler (ENATS)RB125C10.55
234125mm x 45deg RB125 R-Duct Bend 0.6 Rad (ENATS)RB125B4510.34
235125mm x 90deg RB125 R-Duct Bend 0.6 Rad (ENATS)RB125B9010.34
236125mm/145mm Diameter Twinwall Duct Coupling291003.6
237125mm (I.D) x 145mm (O.D.) Black Twinwall Duct Bend - 11.25 Degree2924310.43
238125mm (I.D) x 145mm (O.D.) Black Twinwall Duct Bend - 22.5 Degree2916510.43
239125mm (I.D) x 145mm (O.D.) Black Twinwall Duct Bend - 45 Degree2916610.43
240125mm (I.D) x 145mm (O.D.) Black Twinwall Duct Bend - 90 Degree2915610.43
241150/178mm x 6 Metre Length METROPOWER Duct ENATS c/w coupling - BLACK2971624.99
242150/178mm x 6 Metre Length METRO Twinwall Ducting c/w Coupling - BLUE2935524.99
243150/178mm x 6 Metre Length METRO Twinwall Ducting c/w Coupling - YELLOW2935824.99
244150/178mm Diameter Twinwall Duct Coupling290984.95
245150mm (I.D) x 178mm (O.D.) METRO Twinwall Duct Bend - 11.25 Degree2926210.97
246150mm (I.D) x 178mm (O.D.) METRO Twinwall Duct Bend - 22.5 Degree2918310.97
247150mm (I.D) x 178mm (O.D.) METRO Twinwall Duct Bend - 45 Degree2916310.97
248150mm (I.D) x 178mm (O.D.) METRO Twinwall Duct Bend - 90 Degree2916210.97
249225mm (266) Dia x 6mtr Length METRO Twinwall Duct Plain Ended - Blue2941368.14
250225mm (266) Dia x 6mtr Length METRO Twinwall Duct Plain Ended - Yellow2941168.14
251300mm (353) Dia x 6mtr Length METRO Twinwall Duct Plain Ended - Blue2941493.86
252300mm (353) Dia x 6mtr Length METRO Twinwall Duct Plain Ended - Yellow2941293.86
253Modular Access Chambers 300x300x330mm HIGH NACH3328.74
254Modular Access Chambers 300x450x330mm HIGH NACH3431.65
255Modular Access Chambers 450x450x330mm HIGH NACH4436.73
256Modular Access Chambers 450x600x330mm HIGH NACH4640.39
257Modular Access Chambers 600x600x330mm HIGH NACH6644.05
258300 x 300mm COMPOSITE Inspection Chamber Cover & Galv Frame 12.5glvwECOM288AST55.42
259A15 450 x 450mm COMPOSITE Solid Top Access Cover & FrameGR02234.57
260A15 600mm x 450mm COMPOSITE Solid Top Access Cover & FrameGR02030.21
261A15 600 x 600mm COMPOSITE Solid Top Access Cover & FrameGR02150.16
262B125 450 x 450mm COMPOSITE Inspection Chamber Cover & FrameECOM289ST61.28
263B125 600 x 450mm COMPOSITE Inspection Chamber Cover & FrameECOM290ST87.8
264B125 600 x 600mm COMPOSITE Inspection Chamber Cover & FrameECOM291ST103.75
265Quadbox 1310 x 610 x 150mm deep 106 SectionsJMF106102.82
266Quadbox 915 x 445 x 150mm deep 104 SectionsJMF10462.91
2671310x610mm c/o Concrete Infilled Cover & Frame Badged 'BT' B125EN6178.99
268915x445mm c/o Concrete Infilled Cover & Frame Badged 'BT' B125EN4128.56
269JMF DROP ON STEP FOR QUADBOXBT4STEP12.72
270JMF Modula Joint Box 1 Kit (2 DROP ON WALL BRACKETS ONLY) FOR QUADBOXBT4KITM21.32
271JMF Modular Joint Box 104 Kit complete with bearers for QUADBOXJMFWB221.32
27250mm/63mm Diameter Twinwall Duct Coupling291041.04
27350mm (I.D) x 63mm (O.D.) x 50 Metre Twinwall Ducting Coil - BLACK2911342.26
27450mm (I.D) x 63mm (O.D.) x 50 Metre Twinwall Ducting Coil - BLUE2903942.53
27550mm (I.D) x 63mm (O.D.) x 50 Metre Twinwall Ducting Coil - GREEN2909442.53
27650mm (I.D) x 63mm (O.D.) x 50 Metre Twinwall Ducting Coil - ORANGE T/S2909042.53
27750mm (I.D) x 63mm (O.D.) x 50 Metre Twinwall Ducting Coil - PURPLE2927942.53
27850mm (I.D) x 63mm (O.D.) x 50 Metre Twinwall Ducting Coil - YELLOW2904040.49
27994mm (I.D) x 110mm (O.D.) x 50 Metre Twinwall Ducting Coil - BLACK29267101.2
28094mm (I.D) x 110mm (O.D.) x 50 Metre Twinwall Ducting Coil - BLUE29049101.2
28194mm (I.D) x 110mm (O.D.) x 50 Metre Twinwall Ducting Coil - GREEN29171107.27
28294mm (I.D) x 110mm (O.D.) x 50 Metre Twinwall Ducting Coil - ORANGE S/L29089107.27
28394mm (I.D) x 110mm (O.D.) x 50 Metre Twinwall Ducting Coil - ORANGE T/S29088107.27
28494mm (I.D) x 110mm (O.D.) x 50 Metre Twinwall Ducting Coil - PURPLE29280107.27
28594mm (I.D) x 110mm (O.D.) x 50 Metre Twinwall Ducting Coil - YELLOW29050107.27
286137/160mm Dia x 50mtr Coil Twinwall Duct - Black Electric29092191.33
287137/160mm Dia Twinwall Duct Coupling - Black290995.04
28832/37mm Diameter x 100 Metre Coil Smooth Black Electric DuctPOLY3285.28
28938/44mm Diameter x 100 Metre Coil Smooth Black Electric DuctPOLY38100.57
290Communications below 365mtr Roll Marker Tape, Green MTC15.88
291CCTV 365mtr Roll Marker Tape, Green MTCC15.88
292Electric 365mtr Roll Marker Tape, Yellow MTE15.88
293Fibre Optic 365mtr Roll Marker Tape, GreenMTFO15.88
294Gas 365mtr Roll Marker Tape, Yellow MTG15.88
295Sewer 365mtr Roll Marker Tape, Red MTS15.88
296Street Lighting 365mtr Roll Marker Tape, Yellow MTSL15.88
297Telephone 365mtr Roll Marker Tape, Green MTT15.88
298Traffic Signal 365mtr Roll Marker Tape, Yellow MTTS15.88
299Water 365mtr Roll Marker Tape, Blue MTW15.88
300UK Power Networks Electric Tapetile, Red/Brown, *200mm* x 40mtrTT200UKPN61.93
3014.5 Metre Wide x 100 Metre Roll Terram 1000 Geotextile - Non-Woven GEO173219.77
3024.5Metre Wide x 100Metre Long Geotextile - Woven BlackGEO178106.44
3034.5 Mtr Wide x 100 Mtr Roll Mactex 1000 Non-Woven White GeotextileGEO188193.01
304150mm Diameter x 6 Metre Plain Ended Black Twinwall Pipe 'BBA'RD150X6PE/123.43
305150mm Dia 'BBA' Twinwall Sealing RingSRD1502
306150mm Diameter Twinwall Coupling 'BBA' DN150/172CRD1503.32
307150mm Diameter Twinwall D/S Bend - 30 Degree 'BBA'BRD150X3020.11
308150mm Diameter Twinwall D/S Bend - 15 Degree 'BBA'BRD150X1520.11
309150mm Diameter Twinwall D/S Bend - 45 Degree 'BBA'BRD150X4520.11
310150mm Diameter Twinwall D/S Bend - 90 Degree 'BBA'BRD150X87.520.11
311150 x 150 Twinwall Socketed Junction - 45 Degree 'BBA'JRD150100Y33.21
312150 x 150 Twinwall Socketed Junction - 90 Degree 'BBA'JRD150150T31.63
313150-100mm Metrodrain Level Invert Reducer ARD15010028
314225mm Diameter x 6 Metre Plain Ended Black Twinwall Pipe 'BBA'RD225X6PE/149.28
315225mm Dia 'BBA' Twinwall Sealing RingSRD2253.73
316225mm Diameter Twinwall Coupling 'BBA'CRD2255.55
317225mm Diameter Twinwall D/S Bend - 11.25 Degree 'BBA'BRD225X11.25/139.93
318225mm Diameter Twinwall D/S Bend - 22.5 Degree 'BBA'BRD225X22.5/139.93
319225mm Diameter Twinwall D/S Bend - 45 Degree 'BBA'BRD225X45/139.93
320225mm Diameter Twinwall D/S Bend - 90 Degree 'BBA'BRD225X90/139.93
321225 x 150 Twinwall Socketed Junction - 45 Degree 'BBA'JRD225150Y60.04
322225 x 150 Twinwall Socketed Junction - 90 Degree 'BBA'JRD225150T/160.04
323225 x225 Twinwall Socketed Junction - 45 Degree 'BBA'JRD225225Y91
324225 x225 Twinwall Socketed Junction - 90 Degree 'BBA'JRD225225T/191
325225-150mm Metrodrain Level Invert Reducer ARD22515039.3
326300mm Diameter x 6 Metre Plain Ended Black Twinwall Pipe 'BBA'RD300X6PE/177.23
327300mm Dia 'BBA' Twinwall Sealing RingSRD3005.19
328300mm(353) Dia METRO BBA Twinwall Coupling CRD2257.75
329300mm Diameter Twinwall D/S Bend - 11.25 Degree 'BBA'BRD300X11.25/171.86
330300mm Diameter Twinwall D/S Bend - 22.5 Degree 'BBA'BRD300X22.5/171.86
331300mm Diameter Twinwall D/S Bend - 45 Degree 'BBA'BRD300X45/171.86
332300mm Diameter Twinwall D/S Bend - 90 Degree 'BBA'BRD300X90/171.86
333300 x 150 Twinwall Socketed Junction - 45 Degree 'BBA'JRD300150Y101.91
334300 x 150 Twinwall Socketed Junction - 90 Degree 'BBA'JRD300150T/1101.91
335300 x 300 Twinwall Socketed Junction - 90 Degree 'BBA'JRD300300T/1152.38
336375mm Diameter x 6 Metre Plain Ended Black Twinwall Pipe 'BBA'RD375X6PE/1176.76
337375mm Dia 'BBA' Twinwall Sealing RingSRD3759.64
338375mm Diameter Twinwall Coupling 'BBA'CRD37523.84
339450mm Diameter x 6 Metre Plain End BBA Black Twinwall PipeRD450X6/1219.42
340450mm Dia 'BBA' Twinwall Sealing RingSRD450DS/112.8
341450mm Diameter Twinwall Coupling 'BBA'CRD450/132.61
342600mm Diameter x 6 Metre Plain Ended Black Twinwall Pipe 'BBA'RD600X6/1341.32
343600mm Dia 'BBA' Twinwall Sealing RingSRD600DS/124.93
344600mm Diameter Twinwall Coupling 'BBA'CRD600/154.86
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
Sheet1
 
Upvote 0
If you want to check column C to find the last row, then you need to change the column reference in the formula, i.e.
change this:
Rich (BB code):
lastRow = Cells(Rows.Count,"A").End(xlUp).Row
to this:
Rich (BB code):
lastRow = Cells(Rows.Count,"C").End(xlUp).Row
 
Upvote 0
If you want to check column C to find the last row, then you need to change the column reference in the formula, i.e.
change this:
Rich (BB code):
lastRow = Cells(Rows.Count,"A").End(xlUp).Row
to this:
Rich (BB code):
lastRow = Cells(Rows.Count,"C").End(xlUp).Row
The vba reads as follows but the cursor stays in cell C1

VBA Code:
Sheets("Sheet1").Select
    Range("C1").Select
    lastRow = Cells(Rows.Count, "C").End(xlUp).Row
    ActiveWorkbook.Save
 
Upvote 0
The vba reads as follows but the cursor stays in cell C1
That is right. The code is not selecting anything. It is simply finding the last row in column C with data and storing it in a variable.
You can then do what you want with it (it usually is not necessary to select ranges in order to work with them).

But if you wanted to select the last cell in column C with data, you could then do something like:
VBA Code:
Range("C" & lastRow).Select
or
VBA Code:
Cells(lastRow, "C").Select

Or, if you wanted to capture the range from C1 down to the last row in a variable, you could do:
VBA Code:
Dim rng as Range
Set rng = Range("C1:C" & lastRow)

Or, if you wanted to bypass that lastRow calculation altogether and select the last cell in column C with data, you could do it like this:
VBA Code:
Cells(Rows.Count,"C").End(xlUp).Select
 
Upvote 0
That is right. The code is not selecting anything. It is simply finding the last row in column C with data and storing it in a variable.
You can then do what you want with it (it usually is not necessary to select ranges in order to work with them).

But if you wanted to select the last cell in column C with data, you could then do something like:
VBA Code:
Range("C" & lastRow).Select
or
VBA Code:
Cells(lastRow, "C").Select

Or, if you wanted to capture the range from C1 down to the last row in a variable, you could do:
VBA Code:
Dim rng as Range
Set rng = Range("C1:C" & lastRow)

Or, if you wanted to bypass that lastRow calculation altogether and select the last cell in column C with data, you could do it like this:
VBA Code:
Cells(Rows.Count,"C").End(xlUp).Select
on the 3rd option, I am getting Method of "Range" of object "_global" failed notification

VBA Code:
Range("C1").Select
    Dim rng As Range
    Set rng = Range("C1:C" & lastRow)
    ActiveWorkbook.Save
 
Upvote 0

Forum statistics

Threads
1,215,507
Messages
6,125,207
Members
449,214
Latest member
mr_ordinaryboy

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