+ Reply to Thread
Results 1 to 2 of 2

Unique check-boxes for more than 2 colomns

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Unique check-boxes for more than 2 colomns

    Hey guys, quick question regarding the check-boxes in Excel.

    How i can create an unique selection for example between 3 columns using the TRUE and FALSE cell link?
    When you have 2 columns and you need to select only one , it's simple to use the NOT formula with the one of the cell links, but form more than 2?

    I've attached a demo - same with my problem maybe you guys can illuminate me.

    Thanks,
    Alex
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Re: Unique check-boxes for more than 2 colomns

    Solved using vba idea with the following code :

    Sub checkbox_unique_on_row()
    
    col_number_start = 6
    col_number_stop = 8
    
    Dim shp As Shape
    
    Set shp = ActiveSheet.Shapes(Application.Caller)
        'MsgBox shp.Name 'Name
        'MsgBox shp.TopLeftCell.Address ' checkbox row
        'ActiveSheet.Range(shp.ControlFormat.LinkedCell).Select ' Select linked cell.
    
    cell_row = shp.TopLeftCell.Row
        
    For cell_col = col_number_start To col_number_stop
    
        val_cell_found = Cells(cell_row, cell_col).Value
        adress_cell_found = Cells(cell_row, cell_col).Address(RowAbsolute:=False, ColumnAbsolute:=False)
        cell_link = shp.ControlFormat.LinkedCell
        
    cell_link = Replace(cell_link, "$", "")
    
    
    If val_cell_found <> "False" And cell_link <> adress_cell_found Then
        Cells(cell_row, cell_col).Value = "False"
    End If
    
    Next cell_col
    
    Set shp = Nothing
                
    End Sub
    + Added the sample with it
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] using IF formula to check 2 colomns for same values (not duplicates)
    By Thorwald77 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-24-2016, 10:38 AM
  2. Check boxes that delete other check boxes and change the color of another cell.
    By nhamhamilton in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-29-2014, 02:40 PM
  3. [SOLVED] Coding Yes/No option buttons to not allow check boxes or require check boxes
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-30-2014, 11:32 PM
  4. Replies: 5
    Last Post: 08-07-2014, 12:37 PM
  5. Replies: 1
    Last Post: 05-23-2013, 10:42 AM
  6. I need a code for presence check to check multiple text boxes and combo boxes
    By Lee_wwfc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2013, 01:53 PM
  7. Automatic setting of check boxes based on other check boxes?
    By ArchiveMike in forum Excel General
    Replies: 5
    Last Post: 07-31-2012, 09:43 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1