Posts by pangolin

    Re: Extract all rows that contain a certain value


    see if this code helps


    Re: Find the merged cell


    see if this code helps


    Code
    Sub mergecells()
    For Each cell In ActiveSheet.UsedRange
    If cell.mergecells Then
    Set myrange = Range("A1", "A" & cell.Row - 1)
    myrange.EntireRow.Delete
    Exit Sub
    End If
    Next cell
    End Sub

    Re: Compare two columns in different worksheets


    see if this code helps


    Re: Del Specific Columns via a Macro


    see if this code helps


    Re: Control Radio button from a Radio Button in another group


    one way is to use the "Enable"property when you click on an option button


    see this code below for your options buttons 3 & 4 of Group 1


    [vba]
    Private Sub OptionButton3_Click()
    Sheets("Sheet1").Range("F1") = 30
    OptionButton5.Enabled = False
    OptionButton6.Enabled = False
    OptionButton7.Enabled = True
    OptionButton8.Enabled = True
    End Sub
    Private Sub OptionButton4_Click()
    Sheets("Sheet1").Range("F1") = 40
    OptionButton5.Enabled = False
    OptionButton6.Enabled = False
    OptionButton7.Enabled = False
    OptionButton8.Enabled = True
    End Sub
    [/vba]


    you can set similar code for your other two option buttons
    hope this helps

    Re: Monthly customer comparison - numbers are off


    this is one approach


    =SUM(IF(ISERROR(MATCH($B$2:$B$6,$H$2:$H$6,0))=FALSE,1,0))


    where the first list is in B col and second list is in H col


    note this is an array formula and needs to be conformed by Ctrl+Shift+Enter

    Re: Need help with creating a dependant drop down menu that performs calculations


    for linking List to List you will have to work with Named Ranges and accordingly link the same via data Validation


    in the attached worksheet I have worked out the first field for you


    for seeing the named ranges goto Formulas>>Name Manager


    for seeing how the list have been linked goto Data>>Data Validation>>and under 'allow' select List


    also see how a new table giving List Names have been created in Sheet02...Once you have understood that part the other requirements in your post are repitition which you can pretty much do yourself


    hope that helps

    Re: Sumifs criteria if date is in list


    this is one approach


    =SUMPRODUCT(($D$4:$D$31)*(WEEKDAY($B$4:$B$31,2)=ROW(A1))*ISERROR(MATCH($B$4:$B$31,holidays!$C$3:$C$15,0)=FALSE))


    note the use of WEEKDAY function


    hope that helps

    Re: Copy Row Based On Cell VAlue To Another Worksheet VBA


    you can use this code


    Re: Change TAB Name of a Single Sheet with the Date


    Query 1 can be resolved like this


    Code
    Private Sub Workbook_Open()
    Sheet1.Name = Sheet1.Range("B3").Value
    End Sub


    you need to put this code under VBExplorer>>Microsoft Excel Objects >> "ThisWorkbook"


    Query 2 is returning an error because the dates in the Data worksheet have end of month days while cell B3 have day as 01


    hence you can use this formula


    =SUM(LOOKUP(EOMONTH(B3,0),Data!$A$3:$B$14,Data!B$3:B$14))/1000