+ Reply to Thread
Results 1 to 5 of 5

Use offset with cell value as column reference

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    11

    Use offset with cell value as column reference

    Is there a way to have a cell value be used as the column reference.

    Example:
    Worksheets("WD6G2").ChartObjects("Chart 1").chart.SetSourceData Source:=Range("B17:B19,AH17:AT19").Offset(0, 1)

    I want the 1 to be referenced to a cell in my worksheet so I can update it to the range I need.


    Anything is greatly appreciated.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Use offset with cell value as column reference

    Yes, so long as the cell is long variable(Number).

  3. #3
    Registered User
    Join Date
    11-13-2012
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Use offset with cell value as column reference

    what would the code be, I tried to reference the cell, lets say (A1) but nothing happened.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Use offset with cell value as column reference

    Like this

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-13-2012
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Use offset with cell value as column reference

    Thank you!!

    Perfect.

+ 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. Offset based on cell reference
    By scottjn in forum Excel General
    Replies: 10
    Last Post: 01-02-2020, 09:02 AM
  2. Replies: 3
    Last Post: 06-01-2014, 10:26 AM
  3. OFFSET function - column reference over the edge of the worksheet
    By ronaldev in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-04-2013, 10:09 PM
  4. [SOLVED] How to reference an offset from a cell?
    By poddys in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2006, 04:25 PM
  5. Indirect/Offset Column Reference
    By aldsv in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-01-2005, 11:26 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