Çarşamba, 06 Ekim 2021
  3 Cevaplar
  7.2K Ziyaret
Kutools for Excel'i yeni satın aldım çünkü Excel'de yalnızca seçilen bir alandaki sınırları kopyalamak için bir seçenek arıyordum - içeriği, biçimlendirmeyi, hedef alandan sütun genişliğini değiştirmeden bıraktım.

Bunun için bir çözüm buldum - bu web sayfasında Kutools for Excel'i kullanarak:
https://www.extendoffice.com/documents/excel/4336-excel-copy-borders-only.html#a1 

Şimdi önerilen makroyu kullanmaya çalıştım ve vaat edileni hiç yapmadığını keşfettim:
Kenarlıkları kopyalamanın yanı sıra:
- destionation alanından biçimlendirmeyi siler
- hedef alanının sütununu değiştirir
Üstelik makro oldukça yavaş çalışıyor ve değişiklikler geri alınamıyor.

Lütfen makronun vaat edileni yaptığından emin olmak için bana yardım eder misiniz...?

Senden duymayı umuyorum

En iyi
Marianne
2 yıl önce
·
#2314
Merhaba MariannevanLubek,

Sorun için üzgünüm. Burada durum için başka bir makro yazdık. Lütfen deneyebilir misin?

Sub CopyBorders()
Dim xRg, yRg As Range
On Error Resume Next

Set xRg = Application.InputBox("Select Range with Borders to Copy...", "Kutools For Excel", , , , , , 8)
Set yRg = Application.InputBox("Select Cells to Apply Borders to range..", "Kutools For Excel", , , , , , 8)

With yRg.Borders(xlEdgeLeft)
.LineStyle = xRg.Borders(xlEdgeLeft).LineStyle
.ColorIndex = xRg.Borders(xlEdgeLeft).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeLeft).TintAndShade
.Weight = xRg.Borders(xlEdgeLeft).Weight
End With
With yRg.Borders(xlEdgeTop)
.LineStyle = xRg.Borders(xlEdgeTop).LineStyle
.ColorIndex = xRg.Borders(xlEdgeTop).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeTop).TintAndShade
.Weight = xRg.Borders(xlEdgeTop).Weight
End With
With yRg.Borders(xlEdgeBottom)
.LineStyle = xRg.Borders(xlEdgeBottom).LineStyle
.ColorIndex = xRg.Borders(xlEdgeBottom).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeBottom).TintAndShade
.Weight = xRg.Borders(xlEdgeBottom).Weight
End With
With yRg.Borders(xlEdgeRight)
.LineStyle = xRg.Borders(xlEdgeRight).LineStyle
.ColorIndex = xRg.Borders(xlEdgeRight).ColorIndex
.TintAndShade = xRg.Borders(xlEdgeRight).TintAndShade
.Weight = xRg.Borders(xlEdgeRight).Weight
End With
With yRg.Borders(xlInsideHorizontal)
.LineStyle = xRg.Borders(xlInsideHorizontal).LineStyle
.ColorIndex = xRg.Borders(xlInsideHorizontal).ColorIndex
.TintAndShade = xRg.Borders(xlInsideHorizontal).TintAndShade
.Weight = xRg.Borders(xlInsideHorizontal).Weight
End With
With yRg.Borders(xlInsideVertical)
.LineStyle = xRg.Borders(xlInsideVertical).LineStyle
.ColorIndex = xRg.Borders(xlInsideVertical).ColorIndex
.TintAndShade = xRg.Borders(xlInsideVertical).TintAndShade
.Weight = xRg.Borders(xlInsideVertical).Weight
End With
End Sub


Başka sorularınız varsa, lütfen bana bildirmekten çekinmeyin.

Amanda
2 yıl önce
·
#2315
Merhaba MariannevanLubek,

Size söylemem gereken bir şey var ki, kodu çalıştırdıktan sonra, aşağıdaki ekran görüntüsü gibi, kenarlıkları uygulamak istediğiniz tüm hücreleri seçmelisiniz, ancak bir hücreyi seçmemelisiniz:
hücreleri seç.png

Amanda
Teşekkürler, bu arada sorun başka bir şekilde çözüldü.
  • Sayfa:
  • 1
Bu gönderi için henüz cevap yok.