+ Reply to Thread
Results 1 to 2 of 2

How to programmatically select a range

  1. #1
    Registered User
    Join Date
    12-03-2020
    Location
    US
    MS-Off Ver
    2019
    Posts
    1

    How to programmatically select a range

    image_2020-12-03_22-35-20.png

    I have an issue that I wasn't able to solve after a lot of googling:

    I would like to get the SUM of cells C2:F17 in cell A1, and then I want the range to automatically increase every day. Meaning: tomorrow the range for A1 should be C2:F21, and in two days it should be C2:F25.

    The closest I was able to get was to do
    Please Login or Register  to view this content.
    , but that just gives me a
    Please Login or Register  to view this content.
    .
    Removing the "&" and the quotations around "C2:" gives me a syntax error…

    I attached a minimal example file if you want to mess around with it.
    Attached Files Attached Files
    Last edited by ekaunt; 12-04-2020 at 12:10 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,604

    Re: How to programmatically select a range

    Create your dynamic named range:
    name: SumRange
    refers to: =シート1!$C$2:INDEX(シート1!$F:$F,MATCH(9E+100,シート1!$F:$F))
    a1=SUM(SUMRANGE)
    Attached Files Attached Files
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. named range programmatically editable?
    By vientito in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2013, 07:33 PM
  2. [SOLVED] Programmatically Select Dialog Boxes
    By ajocius in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2012, 11:08 PM
  3. Programmatically UpdateNamed Range
    By Tarball in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2009, 10:47 AM
  4. Select columns programmatically
    By lgarcia3 in forum Excel General
    Replies: 2
    Last Post: 12-15-2006, 12:12 PM
  5. Programmatically defining dynamic range
    By TempestFyre in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2006, 02:55 AM
  6. Can't programmatically set a large array string to a range.
    By Lu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-03-2006, 10:00 PM
  7. How to refer to programmatically Dynamice Range names
    By Mike Metal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2005, 06:06 AM
  8. How do I programmatically specify a range.
    By Hari in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-17-2005, 12:23 PM

Tags for this Thread

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