Ana içeriğe atla

Onay kutularını Excel'deki birden çok hücreye nasıl bağlayabilirim?

Onay kutularını birden çok göreceli hücreye bağlayın, yalnızca işaretli veya işaretli olmayan hücreleri toplamanız, saymanız veya ortalamasını almanız gerektiğinde bazı hesaplamaları hızlı ve kolay bir şekilde yapmanıza yardımcı olabilir. Ancak, bir çalışma sayfasındaki onay kutularını aynı anda birden çok hücreye bağlamayı denediniz mi?

Onay kutularını tek tek formülle birden çok hücreye bağlayın

Onay kutularını VBA kodu ile aynı anda birden fazla hücreye bağlayın


ok mavi sağ balon Onay kutularını tek tek formülle birden çok hücreye bağlayın

Onay kutusunu belirli bir hücreye bağlamak için, onları manuel olarak bağlamak için basit bir formül uygulayabilirsiniz.

1. Çalışma sayfanıza onay kutularını ekledikten sonra, onay kutusunu seçmek için lütfen Ctrl tuşuna basın ve ardından diğer hücreye bağlamak istediğiniz ilk onay kutusunu tıklayın.

2. Ardından formül çubuğuna eşittir işaretini yazın =ve ardından onay kutusunu bağlamak istediğiniz bir hücreye tıklayın, örneğin B2, ekran görüntüsüne bakın:

doc-link-çoklu onay kutuları-1

3. Ve sonra tuşuna basın. Keşfet klavyedeki tuşuna basın, şimdi bu onay kutusunu işaretlediğinizde, bağlantılı hücre DOĞRU, işaretini kaldırırsanız, görüntülenecektir YANLIŞ, ekran görüntüsüne bakın:

doc-link-çoklu onay kutuları-2

4. Diğer onay kutularını tek tek bağlamak için yukarıdaki adımları tekrarlayın.


ok mavi sağ balon Onay kutularını VBA kodu ile aynı anda birden fazla hücreye bağlayın

Diğer hücrelere bağlanması gereken yüzlerce ve binlerce onay kutusu varsa, bunları aynı anda birden çok hücreye bağlamak için ilk yöntem etkili bir şekilde çalışmayacaktır, aşağıdaki VBA kodunu uygulayabilirsiniz. Lütfen şunu yapın:

1. Onay kutuları listesiyle çalışma sayfanıza gidin.

2. Basılı tutun ALT + F11 tuşlarını açmak için Uygulamalar için Microsoft Visual Basic penceresi.

3. tıklayın Ekle > modülve aşağıdaki kodu Modül Penceresi.

VBA kodu: onay kutularını aynı anda birden çok hücreye bağlayın

Sub LinkChecks()
'Update by Extendoffice
Dim xCB
Dim xCChar
i = 2
xCChar = "B"
For Each xCB In ActiveSheet.CheckBoxes
If xCB.Value = 1 Then
    Cells(i, xCChar).Value = True
Else
    Cells(i, xCChar).Value = False
End If
xCB.LinkedCell = Cells(i, xCChar).Address
i = i + 1
Next xCB
End Sub

4. Ve sonra tuşuna basın. F5 Bu kodu çalıştırmak için anahtar, etkin çalışma sayfasındaki tüm onay kutuları hücrelere bağlanmıştır, onay kutusunu işaretlediğinizde, ilgili hücresi görüntülenecektir DOĞRU, bir onay kutusunu temizlerseniz, bağlantılı hücre YANLIŞ, ekran görüntüsüne bakın:

doc-link-çoklu onay kutuları-3

not: Yukarıdaki kodda, i = 2, numara 2 onay kutunuzun başlangıç ​​satırı ve B onay kutularını bağlamanız gereken sütun konumudur. Bunları ihtiyacınıza göre değiştirebilirsiniz.


İlgili yazılar:

Excel'de tek bir onay kutusu kullanarak tüm onay kutularını nasıl seçebilirim?

Excel'de birden çok onay kutusu nasıl hızlı bir şekilde eklenir?

Excel'de birden çok onay kutusu nasıl hızlı bir şekilde silinir?

En İyi Ofis Üretkenlik Araçları

🤖 Kutools AI Yardımcısı: Aşağıdakilere dayalı olarak veri analizinde devrim yaratın: Akıllı Yürütme   |  Kodunu oluşturun  |  Özel Formüller Oluşturun  |  Verileri Analiz Edin ve Grafikler Oluşturun  |  Kutools İşlevlerini Çağır...
Popüler Özellikler: Yinelenenleri Bul, Vurgula veya Tanımla   |  Boş Satırları Sil   |  Veri Kaybı Olmadan Sütunları veya Hücreleri Birleştirin   |   Formülsüz Tur ...
Süper Arama: Çoklu Ölçütlü VLookup    Çoklu Değer VLookup  |   Birden Çok Sayfada VLookup   |   Bulanık Arama ....
Gelişmiş Açılır Liste: Hızla Açılır Liste Oluşturun   |  Bağımlı Açılır Liste   |  Çoklu Seçim Açılır Liste ....
Sütun Yöneticisi: Belirli Sayıda Sütun Ekleme  |  Sütunları Taşı  |  Gizli Sütunların Görünürlük Durumunu Değiştir  |  Aralıkları ve Sütunları Karşılaştırın ...
Öne Çıkan Özellikler: Izgara Odağı   |  Tasarım görünümü   |   Büyük Formül Çubuğu    Çalışma Kitabı ve Sayfa Yöneticisi   |  Kaynak Kütüphanesi (Otomatik metin)   |  Tarih Seçici   |  Çalışma Sayfalarını Birleştirin   |  Hücreleri Şifrele/Şifresini Çöz    E-postaları Listeye Göre Gönder   |  Süper Filtre   |   Özel Filtre (kalın/italik/üstü çizili filtre...) ...
En İyi 15 Araç Seti12 Metin Tools (Metin ekle, Karakterleri Kaldır, ...)   |   50+ Grafik Türleri (Gantt şeması, ...)   |   40+ Pratik Formüller (Yaşı doğum gününe göre hesapla, ...)   |   19 sokma Tools (QR Kodunu Girin, Yoldan Resim Ekle, ...)   |   12 Dönüştürme Tools (Sayılardan Kelimelere, Para Birimi Dönüştürme, ...)   |   7 Birleştir ve Böl Tools (Gelişmiş Kombine Satırları, Bölünmüş hücreler, ...)   |   ... ve dahası

Kutools for Excel ile Excel Becerilerinizi Güçlendirin ve Daha Önce Hiç Olmadığı Gibi Verimliliği Deneyimleyin. Kutools for Excel, Üretkenliği Artırmak ve Zamandan Tasarruf Etmek için 300'den Fazla Gelişmiş Özellik Sunar.  En Çok İhtiyacınız Olan Özelliği Almak İçin Buraya Tıklayın...

Açıklama


Office Tab, Office'e Sekmeli Arayüz Getirir ve İşinizi Çok Daha Kolay Hale Getirir

  • Word, Excel, PowerPoint'te sekmeli düzenlemeyi ve okumayı etkinleştirin, Publisher, Access, Visio ve Project.
  • Yeni pencereler yerine aynı pencerenin yeni sekmelerinde birden çok belge açın ve oluşturun.
  • Üretkenliğinizi% 50 artırır ve her gün sizin için yüzlerce fare tıklamasını azaltır!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Will this work when I try to sort Alphabetically? I've found that when I sort from A-Z, the check boxes do not follow the cells they were originally next to. Will your method help? Thank you!
This comment was minimized by the moderator on the site
My problem is: I am creating a to do list with daily habits. I want to be able to make statistics from it using the true and false from checking the box linked to a cell but do not want to individually do it, but when i use the code nothing happens?
This comment was minimized by the moderator on the site
Hello, Gregor,
The VBA code works well in my workbook.
You can upload your file here, so that we can check where the problem is.
Thank you!
This comment was minimized by the moderator on the site
Здравствуйте.
Подскажите. Возможно ли суммирование чисел в ячейках по установке флажка?

https://drive.google.com/file/d/1qmEnngPDdgWTISJETJ44IkxG-MABfqhh/view?usp=sharing[/img][/b][/u][/b

В ячейке F3 скрыто число 2 а в ячейке G3 скрыто число 0,3, можно ли сделать так чтоб при установки галочки в ячейке Q3 вычислялась сумма.
Сумма вычислений только на строку в диапазоне F3-P3
This comment was minimized by the moderator on the site
great thread and it works for me.
BUT, I need to save the TRUE/FALSE data to another sheet. What is the VBA to save it to another sheet other than the active one?
This comment was minimized by the moderator on the site
How about if you have some empty rows in ColumnA (as per your example) in between checkboxes? Using the above code it gets the linked cells wrong if there are empty rows because it does not skip them. Interested to see the solution
This comment was minimized by the moderator on the site
Did u find any solution for this? Same problem
This comment was minimized by the moderator on the site
Sub LinkCheckBoxes()

Dim chk As CheckBox

Dim lCol As Long

lCol = 1 'number of columns to the right for link



For Each chk In ActiveSheet.CheckBoxes

With chk

.LinkedCell = _

.TopLeftCell.Offset(0, lCol).Address

End With

Next chk



End Sub
This comment was minimized by the moderator on the site
Hello! Nice post about the VBA... but what if there are 3 columns that has checkboxes that needs to be linked in three other columns as well? Let's say columns B, C, and D has checkboxes and should be linked to columns H, I, and J respectively.
This comment was minimized by the moderator on the site
Hi, Having same problem - Have you found out how to get around this? Thanks, Paul
This comment was minimized by the moderator on the site
Hey,

Try this:

Sub LinkCheckBoxes()
Dim chk As CheckBox
Dim lCol As Long
lCol = 2 'number of columns to the right for link

For Each chk In ActiveSheet.CheckBoxes
With chk
.LinkedCell = _
.TopLeftCell.Offset(0, lCol).Address
End With
Next chk

End Sub



If you have for example, checkboxes in D,E,F change "Icol" to 1, so it links to G,H and I, respectively.
This comment was minimized by the moderator on the site
Hi, I have the same issue but did not work for me, can you help please.Thanks
This comment was minimized by the moderator on the site
thank you very much
This comment was minimized by the moderator on the site
Can you help me out with this same problem?
This comment was minimized by the moderator on the site
Can I do this and program the boxes to say something other than true and false?
This comment was minimized by the moderator on the site
Hi, In your VBA code: link checkboxes to multiple cells at once, the code is set up to link the cell below it. How is the code if I want to link the cell to the left of the first one? Thanks!
This comment was minimized by the moderator on the site
i have more than 40000 cell which have checkbox. when i use this code, it takes more than 5 second to process, i define different macros for different cells but i have still the problem, what can i do?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations