+ Reply to Thread
Results 1 to 6 of 6

Use Integer in FormulaR1C1 vlookup?

  1. #1
    Registered User
    Join Date
    08-05-2019
    Location
    UK
    MS-Off Ver
    2016
    Posts
    3

    Use Integer in FormulaR1C1 vlookup?

    Hi all, i’m trying to combine an Integer which denotes a column number with an ActiveCell.FormulaR1C1 command as follows - is this possible? Currently it doesn’t work but i’d like to know if there is a way of making it happen!

    ActiveCell.FormulaR1C1 = “=IFERROR(VLOOKUP(RC[(-xcol+4)],aaa,5,false),0)”

    where xcol is a defined Integer, the value being defined a few lines earlier and in this case being 117. The idea is to offset from column a by a set number of columns to locate the current-week column then insert a vlookup formula where the lookup variable is located in column E.

    Thanks in advance for any tips!

  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
    44,463

    Re: Use Integer in FormulaR1C1 vlookup?

    Maybe

    Please Login or Register  to view this content.
    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
    Registered User
    Join Date
    08-05-2019
    Location
    UK
    MS-Off Ver
    2016
    Posts
    3

    Re: Use Integer in FormulaR1C1 vlookup?

    Thanks for your suggestion - sadly it hasn’t had the desired effect. The cells in question all contain zero, and there’s no formula added.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Use Integer in FormulaR1C1 vlookup?

    Try:

    Please Login or Register  to view this content.
    Rory

  5. #5
    Registered User
    Join Date
    08-05-2019
    Location
    UK
    MS-Off Ver
    2016
    Posts
    3

    Re: Use Integer in FormulaR1C1 vlookup?

    Thanks rorya - this has solved it!

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Use Integer in FormulaR1C1 vlookup?

    Glad to help.

+ 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. how to auto increment integer within vlookup formula?
    By gdallas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2016, 07:19 AM
  2. How to VLOOKUP using FormulaR1C1 in a Filtered Range
    By Saarang84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2015, 03:07 PM
  3. VLOOKUP using non-integer numbers
    By jimavet in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-10-2015, 01:47 PM
  4. FormulaR1C1 = "VLOOKUP()" with VARIABLE RANGE
    By iforget in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2012, 07:03 PM
  5. Count the number of occurrences of an integer withing a larger integer
    By nnktran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2010, 01:04 PM
  6. Excel 2007 : VLOOKUP on FormulaR1C1 problem
    By am0251 in forum Excel General
    Replies: 8
    Last Post: 05-05-2010, 06:57 AM
  7. vlookup with non-integer
    By mba2010 in forum Excel General
    Replies: 2
    Last Post: 10-06-2008, 02:27 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