Results 1 to 7 of 7

Thread: fill in cells according to selected optionbutton

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    14
    Code:
                With .Range("B" & Rows.Count).End(xlUp)
                    .Offset(, 1).Resize(, 16).Interior.ColorIndex = 34
                    .Offset(, IIf(OptionButton4, 8, 13)).Resize(, 5).Interior.ColorIndex = xlNone
                End With
    Code:
    Sub SubTotalize()
       
        With Sheets("XFLOW A")
           .Unprotect Password:="abc"
           .Range("B7:Q" & .Cells(Rows.Count, 2).End(xlUp).Row).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(3, 4, 7, 12, 16), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
            With .Range("B" & Rows.Count).End(xlUp)
                .Offset(-1, 1).Resize(2, 16).Interior.ColorIndex = xlNone
            End With
           .Protect UserInterfaceOnly:=True, Password:="abc"
        End With
        
    End Sub
    Last edited by bakerman; 09-13-2013 at 06:27 AM.

Similar Threads

  1. Replies: 1
    Last Post: 08-20-2013, 04:31 PM
  2. Replies: 9
    Last Post: 08-02-2013, 07:55 PM
  3. Unmerge Cells and Fill with Duplicate Values
    By princ_wns in forum Excel Help
    Replies: 3
    Last Post: 10-09-2012, 07:36 AM
  4. Replies: 2
    Last Post: 09-24-2012, 06:24 PM
  5. Replies: 0
    Last Post: 02-27-2012, 01:07 AM

Posting Permissions

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