Posts by pradeep_atm

    Re: My If Formula


    Hi,


    Welcome to the Forum.


    You can use If formula, since there are only 4 categories. It looks something like this:
    If(C5="Security",6,if(C5="VP Assistance",8,if(C5="Groundsmen",6,7))..similary you can try for Salary per hour. I have put some numbers you change it accordingly..


    And how did you copy the entire excel screen and pasted here..that looks good..!


    HTH.

    Re: Sorting by color


    Hi,


    You can check Dave's tutorial or in this forum. This question been already answered.


    This what I use(though a raw one):
    [vba]
    Function Getcolor(Rn As Range) As Integer
    Dim d As Long
    d = Rn.Interior.ColorIndex
    Getcolor = d
    End Function
    [/vba]


    Place this UDF in your workbook module and in your worksheet do the following:
    1. Insert a column just to the left the data
    2. Press Shift+F3 and select UDF(User Defined Functions)..here you can find Getcolor funtion.
    3. Select this function and link to the data and drag it through till the end. This function would have returned the color index, through which you can sort your data. After you are through with this you can delete the coloumn which you have inserted.


    This function doesn't hold good to sort for font colors.


    HTH.

    Re: Page Set up before Print


    Hi,


    Thanx for your replies.


    I tried saving the "Book1" in xlstart...but how does it help to have the default Page set up? Well I tried all that but still doesn't show up as default set up(again I had to set up).


    Is My understanding correct ? am doing anything different...


    Gollem, thanx for your revised code. It also not seems to have speedden the code..


    Thanx

    Re: Page Set up before Print


    Hi Gollem,


    thanx for your reply. Your code works perfectly, though it takes some time to run(and I have added .Centerfooter = "&F", to get the file name as well).


    I was interested in making this as default set up. That is I should not be running this macro every time I go for a print...(But if we assign this to a before print event it will be linked to that workbook alone..). Same is the case with View-Header/Footer...I have to do it every time I go for a print..


    Any idea if I save this code in Personal workbook before print event it gets triggered whenever I give a print or it will be only applicable to Personal workbook.


    Hope I made it clear what I want to achieve.


    Please help.

    Re: If/Then Statement String


    Hi,


    Welcome Ozgrid Forum!


    Please try the following. I have said if none of the conditions you have specified met then return null string(you can modify if that is not the case).


    [vba]
    =IF(D8>=D9,E9,IF(D8>=D10,E10,IF(D8>=D11,E11,"")))
    [/vba]


    HTH.

    Re: Controlling paste method


    No I am not clear as to what you want..sorry!


    All the other paste options will still be available to the user. You can replace the normal Ctrl+v option with the paste values only option( that is assinging the Ctrl+v short cut to the above macro).


    Do you want to give the user, even paste formulas, formats etc options ..??


    [quote]:I do not want to take away all the paste options from the user

    Hi All,


    Is it possible to set the following Page footer, as the default footer(either by coding or some other mode):


    [vba]
    "Sheet Name" and " Page 1 of ?"
    [/vba]


    And if the coding is linked to before print event, will be restricted to that workbook alone..!




    Thanx

    Re: Controlling paste method


    Hi Rana,


    Try the following:


    [vba]
    Sub pastespecial()
    Selection.pastespecial Paste:=xlValues
    End Sub
    [/vba]


    Record a macro and assign the macro a short cut and paste the above code into the macro. And whenever the short cut key is pressed(instead of Ctrl+v) only values are pasted.


    HTH.

    Re: Color Cells


    Hi,


    Try the following:


    Format -Conditional Formating - In condition 1 box select Formula is: type here the formula( you can try what Norie has suggested).


    HTH.

    Re: #REF error when deleting a row


    Hi Dean,


    Welcome to Ozgrid forum.


    " formula is quite long but the basics of it are that it checks itself against the value of the cell above."


    As per what you are saying, there seems to be a circular reference in that cell. There could be many reasons as to why #REF is given out in the cells. If you are deleting the cells which has links to some other cells will give this sort of results.


    If you still need further help, you can think of attaching a sample of your data, so that some can help.


    HTH.