1.    29 May 2008 #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.    29 May 2008 #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.    29 May 2008 #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.    30 May 2008 #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


Similar Threads
Thread Forum
From Excel VBA to vbScript
How would I convert this macro to vbScript? Sub Macro1() ' ' Macro1 Macro ' Range("AQ157").Select Selection.End(xlDown).Select...
VB Script
vbscript start excel run macro not working
I am trying to run a vbscript that opens excel then executes a macro. I have code that works but I get an error saying "The macro "sort" can not be...
VB Script
Re: How to copy large data from one excel to another using VBScript
http://www.4guysfromrolla.com/webtech/010401-1.shtml Thanks to advice above, I have rewritten a few scripts to read a data file to an array first,...
VB Script
Vbscript unable to trap error into excel
Hi Guys, I am trying to grab some information about a list of servers into excel files, which works fine. What i am unable to do is trap the...
VB Script
Exporting MsSQL table to Excel using vbScript?
Hi, I wrote a vbscript application that connects to a remote MsSql database via ODBC. I can connect, query the db and fetch records without any...
VB Script
Vbscript to Search Excel
Hi, I am trying to write a Vbscript which will search for some keywords in all the worksheets of a excel file and if a match is found then the...
VB Script
VBscript applying borders in Excel
Hello, Can anyone tell me how to apply borders to a range of cells in excel sheet. Any soultions will be highly appreciated. Regards...
VB Script

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • PC Help Forum
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 11:03.
    .