Put a Line on the bottom of a group of cells

jgoulart

Board Regular
Joined
Feb 16, 2002
Messages
62
I have a routine that loops through a database and picks out data and puts it on another sheet in columns 1 to 5 in the same row. It pulls data from the database file from 1 to 17 records before moving to the next row (or record). I want to put a line on the bottom of the cell of the last record of the group in the columns 1 to 5. The data in these columns is not always filled. I'm unsure how to format the cells with line at the bottom of the cell. Does anyone have some good advice?

John
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Yes sir, right-click on the cell, choose 'format cells...' Click on the 'Border' tab. Select your line weight on the right and click beneath the text. Then hit the ok button.

HTH. Cheers,
Nate
 
Upvote 0
Ou, en vba monsieur:

With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
End With

Cheers, Nate
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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