+ Reply to Thread
Results 1 to 4 of 4

Using Dynamic Range in VBA Formula

  1. #1
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Using Dynamic Range in VBA Formula

    Hello everybody.
    I have simple formula like:
    Please Login or Register  to view this content.
    I am using this formula in macro code (somewhere) like:
    Please Login or Register  to view this content.
    But , I want to use dynamic "lr" (as LastRow) instead of "$G$2:$G$5000" like "$G$2:$G$ & lr" (this doesn't work)just same as "ws.Range("I2:I" & lr)" in the code.

    How can it be fixed?

    Thanks in advance for any reply and help.

    Best regards.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,094

    Re: Using Dynamic Range in VBA Formula

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Using Dynamic Range in VBA Formula

    Dear TMS,
    Thank you very much.

    I'll Never forget this "key solution" .

    Regards.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,094

    Re: Using Dynamic Range in VBA Formula

    You're welcome. Thanks for the rep.

+ 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. Dynamic Range Formula
    By amartin575 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-07-2014, 04:32 PM
  2. [SOLVED] chart based on dynamic range which resizes as per data in range-formula / vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2014, 04:02 PM
  3. [SOLVED] Change Static Range of Formula to Dynamic Range
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-24-2014, 10:15 AM
  4. [SOLVED] Help - Formula To Sum A Dynamic Range
    By keithfender in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-18-2013, 09:34 AM
  5. Dynamic Range with unused formula messing up x axis on dynamic graph
    By cabybake@yahoo.com in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-02-2006, 04:10 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