Posts by aysam

    Hi all
    I'm doing a formula using SUMIF
    When the criteria in the formula is a date, it returns 0 Why ? I don't know
    My formula is
    Code:
    =SUMIF(DEBTS!$A$5:$C$150;D2;DEBTS!$C$5:$C$150)

    D2 is a cell that have a date
    this formula results 0 value
    even though it returns correct values if D2 is not a date
    Hope I'm clear enough
    using office Excel 2003
    waiting

    Re: Run a macro in three or more sheets at the same time


    Quote from Barb-B;648045

    Or, if you want to work only with some sheets in your workbook, and not others you could do something like this:


    Code
    For Each sht in Array(Sheets("Sheet1"), Sheets("Sheet3"), Sheets("fubar"))
            sht.Range("a1") = "Put something here"
        Next sht


    Hi Barb_B
    thanks for your try to help
    But
    it Pops out a run time error 92
    for loop not initialized
    and yellow highlights >>> next sht

    Hi all I have a piece of code
    I want it to run in three sheets in my workbook at the same time
    I searched the forum and tried a lot but I couldn't do it
    Is there anyone could help ?
    Of course there are many
    My code is

    I have got this code from here
    The code is to password protect and unprotect a workbook in one go.
    When I enter a wrong password it gives an error message
    I want it to show a vba mesaage " Wrong Password " and go on.
    Thanks in advance
    the code is :

    Peace to you all
    I need a formula to execlude FRIDAYS from a serious of dates
    I mean
    to put a start date and copy it down without the Fridays
    1/7/2010------------Thursday
    3/7/2010------------Saturday
    4/7/2010------------Sunday
    5/7/2010------------Monday
    6/7/2010------------Tuesday
    7/7/2010------------Wednesday
    8/7/2010------------Thursday
    10/7/2010-----------Saturday
    Thanks in advance

    Peace to you all
    I have a code that looks for a number in a column
    The numbers in the column are not in the correct order
    332
    256
    147
    33
    158
    70

    Code
    Private Sub CommandButton1_Click()
    On Error GoTo 100
    Dim d
    Dim ra As Range
    [COLOR=red]Columns(2).Find(C, MatchCase:=True).Activate[/COLOR]
    A = MsgBox("Do you want to delete the data", 4)
    If A = 6 Then ActiveCell.EntireRow.Delete
    Exit Sub
    100 MsgBox ("Error")
    End Sub


    the problem is
    if I want to look for number ( 33 ) the code activates (332 )the first number that has 33
    Any help 'd be greatly appreciated

    Re: VBA macro simple adjust


    Hi PCI
    I tried your code but it selects the first Cell after the inserted rows
    But it helped me greatly to acheive my goal which is
    to select the first cell of the inserted rows
    I added this piece to yours

    Code
    ActiveCell.Offset(vRows - vRows + 1, 0).Select


    OR

    Code
    ActiveCell.Offset(1, 0).Select


    Once again thanks soooooo much

    Peace to you all
    I have a macro to insert blank rows after the active cell . ("B6")
    for example
    It's OK
    What I need is
    to make the active cell after the insert to be
    the first cell after the first active cell ("B7")
    my macro is

    Peace to you all
    I already have a code to printpreview multiple ranges


    It printpreviews only the first Range ( C )
    I need it to print previews Ranges ( C ) and ( D ) or more in one page
    I hope I'm clear enough
    Any help'd be highly appreciated