Partial formatting locking

danmac

New Member
Joined
Dec 2, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

Is there a way to lock only selected formatting parameters while leaving others editable? I'm looking for a way to have background pattern and border thickness set up and fixed for certain ranges in spreadsheet and so when copying/pasting/moving cells around, the content and background color moves with it while borders and pattern applies depending on what range the cell is being moved/copied to.

for example: in row 1 there is no pattern and thick border, in row 2 there is pattern and thin border. When moving cell from row 2 to row 1, I need background color and text to be moved but borders and pattern to be applied as specified per row.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

danmac

New Member
Joined
Dec 2, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
can anyone help with this please?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,682
Office Version
  1. 365
Platform
  1. Windows
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Moving cells including formatting but excluding background pattern?
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 

danmac

New Member
Joined
Dec 2, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Moving cells including formatting but excluding background pattern?
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
8,852
Office Version
  1. 2016
Platform
  1. Windows
Use the worksheet change event to detect when the target range has changed as a result of the moving or pasting. Then, just re-apply background pattern and border thickness.
 

danmac

New Member
Joined
Dec 2, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Use the worksheet change event to detect when the target range has changed as a result of the moving or pasting. Then, just re-apply background pattern and border thickness.
Thank you very much for this tip. It took me a month to learn VBA basics from zero and program this but it's working now.
 

Forum statistics

Threads
1,176,008
Messages
5,900,836
Members
434,855
Latest member
backspace18

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