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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,218,808
Messages
6,144,603
Members
450,557
Latest member
Lahoya

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