+ Reply to Thread
Results 1 to 4 of 4

How Run Formula varying the Range

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    Porto
    MS-Off Ver
    Excel 2010
    Posts
    94

    How Run Formula varying the Range

    Hey guys.

    I have a file that varies its range and I have this formula that I want her to run when the file is prepared for it.

    Please Login or Register  to view this content.
    If I do like this the value from A3 its going to be the same for all the table.

    If I remove the $ behind the A3 the same value goes down again. I just would like to say instead of A3 Sheet2.Cells(i + 1, 1) and everything would be OK, but when I do that excel does't recognize it.

    can u help me?

    Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How Run Formula varying the Range

    You switch to the .FormulaR1C1 syntax to solve using your looping input method. But in truth, your .Formula method WOULD work if you did not loop. If you entered all your formulas at once into the entire range, then they would adjust themselves going down. For example:

    Please Login or Register  to view this content.
    Also, Excel 2010 has an IFERROR function you can utilize so as to not have to run the VLOOKUP twice every time:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 07-19-2014 at 04:53 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-27-2013
    Location
    Porto
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: How Run Formula varying the Range

    Thanks a lot mate.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How Run Formula varying the Range

    As it appears you've reached a conclusion, I've marked this thread SOLVED for you.
    FYI, this is done through the Thread Tools located above the first post in this thread. Thanks.

+ 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. [SOLVED] Macro - Create / Copy / Paste Formula every 5 rows for varying range
    By Jill Pleau in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-29-2014, 12:31 PM
  2. [SOLVED] Varying validation drop-downs based on varying cell values
    By navarreman1 in forum Excel General
    Replies: 2
    Last Post: 08-08-2013, 08:13 AM
  3. [SOLVED] Dynamic Range Reference, Varying Size of Range
    By cdiaz in forum Excel General
    Replies: 2
    Last Post: 06-30-2011, 02:49 PM
  4. Custom formula run in blanks for varying range sizes
    By Rattler04 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2009, 05:01 PM
  5. varying a range in a formula
    By Justme47 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-31-2009, 10:09 AM

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