Move selected cells without formatting

1

I need to move (drag & drop) a selection of cells inside a formatted grid using border. The issue is that every time that the selection has borders the formatting is moved too. There's a way (good a script too) to avoid the move of the formatting ?

C.B.

Posted 2019-10-18T18:02:00.647

Reputation: 125

1You need to copy paste the values then clear the contents of the range. – Scott Craner – 2019-10-18T18:05:46.293

Copy and Paste Values or Paste Formulas will do what you want without moving borders or other formating – John – 2019-10-18T18:06:54.440

@John on excel 2010 if destination is overlapping source I cannot past only value :( – C.B. – 2019-10-18T18:10:04.473

@ScottCraner I don't understand .. can you elaborate? – C.B. – 2019-10-18T18:11:11.533

@C.B. I think you need to further clarify your question as you detailed more in these comments. Pasting values overlapping source indeed keeps the formatting on the overlapped section. You can highlight that overlapped formatted subsection & hit Clear, Clear Formarts – gregg – 2019-10-18T18:38:14.823

@C.B. a specific example of what you are doing/getting and what you actually want to get would be helpfull – Albin – 2019-10-18T20:06:47.413

Answers

1

If you would "copy" the cells instead of cutting them (or in your case drag&drop), you could paste them without the boarders (Paste Special). Unfortunately this does not work for cutting.

The workaround could consist of the following two macros:

Select an area and run macro1:

  • reference the selection in a range (rng1)
  • create a new worksheet
  • paste rng1 into the new worksheet (wks1) without boarders (paste special) and reference as rng2

Select the target cell and run macro2

  • delete content of rng1
  • cut rng2 and paste it into the target range
  • delete wks1

Good luck, and let us know if you run into any problems

Albin

Posted 2019-10-18T18:02:00.647

Reputation: 3 983