ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I Preserve Borders? (https://www.excelbanter.com/excel-discussion-misc-queries/146709-how-do-i-preserve-borders.html)

BeetleBailey

How do I Preserve Borders?
 
When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???

ShaneDevenshire

How do I Preserve Borders?
 
Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


robert morris

How do I Preserve Borders?
 
This is a information site, not a pulpit

Bob


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


BeetleBailey

How do I Preserve Borders?
 
It depends on the cell. There are formulas in some, times in others and text.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


BeetleBailey

How do I Preserve Borders?
 
No Preaching here, just a Thought Provoking statement/question.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"robert morris" wrote:

This is a information site, not a pulpit

Bob


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


ShaneDevenshire

How do I Preserve Borders?
 
Hi,

You can add the following macro to the sheet object:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B")
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
End With
End Sub

To get this to work name the range where the grids should be to B. You can
change the LineStyle, Weight, or ColorIndex to suit your needs.
--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

It depends on the cell. There are formulas in some, times in others and text.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


BeetleBailey

How do I Preserve Borders?
 
Thanx Shane for the info. I'd hoped that it was a simple matter of just
"Locking" in a format, but I can see that a Programming Education is required.

I'd appreciate knowing how to do what you what wrote if that won't require
your writing too many volumes of "Excel for Dummies". You can email or PM me
if taht would e better or provide link.

I'll take a look in the Excel Help area and see what I can find in the mean
time.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

You can add the following macro to the sheet object:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B")
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
End With
End Sub

To get this to work name the range where the grids should be to B. You can
change the LineStyle, Weight, or ColorIndex to suit your needs.
--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

It depends on the cell. There are formulas in some, times in others and text.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


BeetleBailey

How do I Preserve Borders?
 
Shane,

Believe it or not, I figured out how to get the Macro in and running.
HOWEVER...

When I try to cut or copy and paste in the Worksheet, I can't -- Not
anywhere in the sheet. The Paste Option is grayed out (Unavailable). That's
not good.

Any suggestions???
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"BeetleBailey" wrote:

Thanx Shane for the info. I'd hoped that it was a simple matter of just
"Locking" in a format, but I can see that a Programming Education is required.

I'd appreciate knowing how to do what you what wrote if that won't require
your writing too many volumes of "Excel for Dummies". You can email or PM me
if taht would e better or provide link.

I'll take a look in the Excel Help area and see what I can find in the mean
time.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

You can add the following macro to the sheet object:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B")
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
End With
End Sub

To get this to work name the range where the grids should be to B. You can
change the LineStyle, Weight, or ColorIndex to suit your needs.
--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

It depends on the cell. There are formulas in some, times in others and text.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


ShaneDevenshire

How do I Preserve Borders?
 
Hi,

I interpreted your original question - " I move cells from one
location to another" - to mean you were dragging and dropping the selected
cells.

In that case, make the following little change -
Change the name of the macro to

Private Sub Worksheet_Change(ByVal Target As Range)


--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

Shane,

Believe it or not, I figured out how to get the Macro in and running.
HOWEVER...

When I try to cut or copy and paste in the Worksheet, I can't -- Not
anywhere in the sheet. The Paste Option is grayed out (Unavailable). That's
not good.

Any suggestions???
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"BeetleBailey" wrote:

Thanx Shane for the info. I'd hoped that it was a simple matter of just
"Locking" in a format, but I can see that a Programming Education is required.

I'd appreciate knowing how to do what you what wrote if that won't require
your writing too many volumes of "Excel for Dummies". You can email or PM me
if taht would e better or provide link.

I'll take a look in the Excel Help area and see what I can find in the mean
time.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

You can add the following macro to the sheet object:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B")
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
End With
End Sub

To get this to work name the range where the grids should be to B. You can
change the LineStyle, Weight, or ColorIndex to suit your needs.
--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

It depends on the cell. There are formulas in some, times in others and text.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


BeetleBailey

How do I Preserve Borders?
 
Shane,

Once again I say Thanx. Want to make it 3???

If I want to apply this macro to a block of other cells, is it possible to
add more ranges to the macro With Range ("B") or can I redefine the Range to
include other cells???

--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

I interpreted your original question - " I move cells from one
location to another" - to mean you were dragging and dropping the selected
cells.

In that case, make the following little change -
Change the name of the macro to

Private Sub Worksheet_Change(ByVal Target As Range)


--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

Shane,

Believe it or not, I figured out how to get the Macro in and running.
HOWEVER...

When I try to cut or copy and paste in the Worksheet, I can't -- Not
anywhere in the sheet. The Paste Option is grayed out (Unavailable). That's
not good.

Any suggestions???
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"BeetleBailey" wrote:

Thanx Shane for the info. I'd hoped that it was a simple matter of just
"Locking" in a format, but I can see that a Programming Education is required.

I'd appreciate knowing how to do what you what wrote if that won't require
your writing too many volumes of "Excel for Dummies". You can email or PM me
if taht would e better or provide link.

I'll take a look in the Excel Help area and see what I can find in the mean
time.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

You can add the following macro to the sheet object:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B")
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
End With
End Sub

To get this to work name the range where the grids should be to B. You can
change the LineStyle, Weight, or ColorIndex to suit your needs.
--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

It depends on the cell. There are formulas in some, times in others and text.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


ShaneDevenshire

How do I Preserve Borders?
 
Hi,

A little slow getting back, but had a very busy week. You can define the
range B to be anything you want and you can change the definition anytime you
want. Simply select a desired range(s) and press Ctrl+F3 and retype the name
in the Names in workbook box.
--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

Shane,

Once again I say Thanx. Want to make it 3???

If I want to apply this macro to a block of other cells, is it possible to
add more ranges to the macro With Range ("B") or can I redefine the Range to
include other cells???

--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

I interpreted your original question - " I move cells from one
location to another" - to mean you were dragging and dropping the selected
cells.

In that case, make the following little change -
Change the name of the macro to

Private Sub Worksheet_Change(ByVal Target As Range)


--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

Shane,

Believe it or not, I figured out how to get the Macro in and running.
HOWEVER...

When I try to cut or copy and paste in the Worksheet, I can't -- Not
anywhere in the sheet. The Paste Option is grayed out (Unavailable). That's
not good.

Any suggestions???
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"BeetleBailey" wrote:

Thanx Shane for the info. I'd hoped that it was a simple matter of just
"Locking" in a format, but I can see that a Programming Education is required.

I'd appreciate knowing how to do what you what wrote if that won't require
your writing too many volumes of "Excel for Dummies". You can email or PM me
if taht would e better or provide link.

I'll take a look in the Excel Help area and see what I can find in the mean
time.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

You can add the following macro to the sheet object:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B")
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 55
End With
End With
End Sub

To get this to work name the range where the grids should be to B. You can
change the LineStyle, Weight, or ColorIndex to suit your needs.
--
Cheers,
Shane Devenshire


"BeetleBailey" wrote:

It depends on the cell. There are formulas in some, times in others and text.
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???


"ShaneDevenshire" wrote:

Hi,

What's in the cells - formulas, numbers, dates, text, blanks?

--
Thanks,
Shane Devenshire


"BeetleBailey" wrote:

When I apply borders to my spreadsheet and then I move cells from one
location to another, the vacated cells become Borderless. Is there a way to
Retain the Borders in the vacated cells w/o having to reapply the borders?
--
He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a
FOOL FOREVER!!!
Where Will YOU Spend ETERNITY???



All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com