Windows Vista Forums

new to excel and vbscript - need help

  1. #1


    thewhizkid Guest

    new to excel and vbscript - need help

    I am familiar with MS EXcel but I dont know VBscript, so please help.

    I have a XL sheet with data in three columns - A,B and C.

    I want to find the biggest two out of A,B,C and then average the two.

    How should my VBscript look like ?


    Thanks

    Ravindra

      My System SpecsSystem Spec

  2. #2


    Pegasus \(MVP\) Guest

    Re: new to excel and vbscript - need help


    "thewhizkid" <rsdivekar@xxxxxx> wrote in message
    news:ba6ad564-85c2-47c3-9587-c5623379a426@xxxxxx

    >I am familiar with MS EXcel but I dont know VBscript, so please help.
    >
    > I have a XL sheet with data in three columns - A,B and C.
    >
    > I want to find the biggest two out of A,B,C and then average the two.
    >
    > How should my VBscript look like ?
    >
    >
    > Thanks
    >
    > Ravindra
    Wouldn't it be simpler to do this with a macro in Excel?



      My System SpecsSystem Spec

  3. #3


    Tom Lavedas Guest

    Re: new to excel and vbscript - need help

    On May 29, 7:34 am, "Pegasus \(MVP\)" <I....@xxxxxx> wrote:

    > "thewhizkid" <rsdive...@xxxxxx> wrote in message
    >
    > news:ba6ad564-85c2-47c3-9587-c5623379a426@xxxxxx
    >

    > >I am familiar with MS EXcel but I dont know VBscript, so please help.
    >

    > > I have a XL sheet with data in three columns - A,B and C.
    >

    > > I want to find the biggest two out of A,B,C and then average the two.
    >

    > > How should my VBscript look like ?
    >

    > > Thanks
    >

    > > Ravindra
    >
    > Wouldn't it be simpler to do this with a macro in Excel?
    You're right, there is no stated requirement that suggests a VBS
    implementation. In fact, looking at the stated problem, it would seem
    to me that there isn't even a need for a VBA macro. This worksheet
    formula in column D solves the problem ...

    =(SUM(A1:C1)-MIN(A1:C1))/2

    That is, unless there is something else that wasn't said in the
    original post.

    Tom Lavedas
    ===========
    http://members.cox.net/tglbatch/wsh/

      My System SpecsSystem Spec

  4. #4


    thewhizkid Guest

    Re: new to excel and vbscript - need help

    On May 29, 8:30*pm, Tom Lavedas <tglba...@xxxxxx> wrote:

    > On May 29, 7:34 am, "Pegasus \(MVP\)" <I....@xxxxxx> wrote:
    >
    >
    >
    >
    >

    > > "thewhizkid" <rsdive...@xxxxxx> wrote in message
    >

    > >news:ba6ad564-85c2-47c3-9587-c5623379a426@xxxxxx
    >

    > > >I am familiar with MS EXcel but I dont know VBscript, so please help.
    >

    > > > I have a XL sheet with data in three columns - A,B and C.
    >

    > > > I want to find the biggest two out of A,B,C and then average the two.
    >

    > > > How should my VBscript look like ?
    >

    > > > Thanks
    >

    > > > Ravindra
    >

    > > Wouldn't it be simpler to do this with a macro in Excel?
    >
    > You're right, there is no stated requirement that suggests a VBS
    > implementation. *In fact, looking at the stated problem, it would seem
    > to me that there isn't even a need for a VBA macro. *This worksheet
    > formula in column D solves the problem ...
    >
    > =(SUM(A1:C1)-MIN(A1:C1))/2
    >
    > That is, unless there is something else that wasn't said in the
    > original post.
    >
    > Tom Lavedas
    > ===========http://members.cox.net/tglbatch/wsh/- Hide quoted text -
    >
    > - Show quoted text -
    Thanks a lot..
    The solution was simpler than I thought.
    Appreciate ur help.
    Ravi

      My System SpecsSystem Spec


new to excel and vbscript - need help
Similar Threads
Thread Forum
From Excel VBA to vbScript VB Script
Re: How to copy large data from one excel to another using VBScript VB Script
Exporting MsSQL table to Excel using vbScript? VB Script
Vbscript to Search Excel VB Script
VBscript applying borders in Excel VB Script