Results 1 to 6 of 6

How to set up a variable range of rows for calculations in VBscript

Threaded View

  1. #1
    Registered User
    Join Date
    06-29-2020
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    3

    How to set up a variable range of rows for calculations in VBscript

    Hi all. I'm a long time lurker but first time poster. Thanks for all the great content on this site!

    I generate a report multiple times a day with varying data which is always formatted the same with exception to the number of "Results". I've created a macro to automatically resize columns, add columns, format, etc...but I'm stumped at how to perform a simple calculation of "Average", "Median", "Max", and "Min" on a range of values due to the fact that sometimes the range is performed on 10 rows, sometimes 8, sometimes 20, etc. I have highlighted the cells in the attached workbook with these simple calculations. I just need help identifying the code that will be flexible to allow for a varying number of Results every time I bring a report into my workbook. Thank you!!!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBScript to Extract the Recent and Older rows to new sheet.
    By jagadeeshpj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2017, 12:43 AM
  2. Check multiple calculations where one variable is between a range
    By crise in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2016, 11:16 AM
  3. excel 2007 macro need to have variable range of rows rather than fixed range
    By JW1028 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:45 PM
  4. Multiple Variable Worksheets problem -vbscript
    By SeraphicSoul in forum Excel General
    Replies: 0
    Last Post: 06-18-2012, 01:55 AM
  5. Datatype of Range for VBScript
    By TheBrigg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2012, 12:54 PM
  6. [SOLVED] Call VBScript from VBA, pass variable, return result to macro?
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 07-11-2006, 02:15 PM
  7. using data from an excel field in a variable in a VBscript (WSH)?
    By JurgenG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2005, 03:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1