Putting border around 5 cells and 5,000 rows ?

tcurrier

Board Regular
Joined
Apr 27, 2006
Messages
175
Hi,

I have a spreadsheet where I need to put a border around 5 cells across and 5,000 rows down.... The only way I can figure out how to do it is to highlight the 5 cells, and drag all the way down to the 5,000th row. Then click 'format cells', 'border', 'outline'...... I also have other groups of cells on the same spreadsheet that I need to do the same thing with.

Can anyone save me about 1/2 hour of work with an easy way to do this ?

Thanks !
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,300
Office Version
  1. 365
Platform
  1. Windows
What range do you want to do this formatting in?

Let's say it's A1:E5000.

In the name box, to the left of the formula bar, just enter A1:E5000.

That should select the required range which you should be able to format via the Format... menu.
 

tcurrier

Board Regular
Joined
Apr 27, 2006
Messages
175
I tried that, but it doesn't seem to work...

I put A1:G10 in the 'name' box.... then clicked 'Format', 'Cells'....
but the A1:G10 goes away as soon as I click the 'Format' button .....
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,300
Office Version
  1. 365
Platform
  1. Windows
Try pressing Enter after you've put the range in the Name Box.
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
Or since this sounds like something done regularly, you may be interested in a quick
little one liner in vba.

Assumes the ranges will stay the same, and you want just a standard black border.
Code:
Sub BorderMe()
Range("A1:E5000, G1:H10").BorderAround LineStyle:=xlContinuous
End Sub
 

Forum statistics

Threads
1,136,588
Messages
5,676,675
Members
419,643
Latest member
ishanalikhan

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
Top