none
Excel VBA to sum row dynamically RRS feed

  • Question

  • Hi All,

    Below is the sample of my spreadsheet which starts from row 9.

    (In below sample, City to March sales are header and NY to $300 is data)

    CITY      Jan Sales      Country      Zip      Feb sales     Country2     Zip2      March Sales

    NY        $100             USA         10010      $200              China        xxx        $300

    cell A1 is Report month which user can select from Jan to Dec. If user selects March as report month than from above spreadsheet i want sum of Jan to March sales which is (100+200+300=600), if rep month is June than from Jan to June.

    I can write if condition like if Report month = June than sum some thing but that will go till dec which is not ideal way to do it.

    Thanks,

    Zav


    • Edited by zaveri cc Thursday, June 2, 2016 6:41 PM
    Thursday, June 2, 2016 6:36 PM

Answers

All replies