+ Reply to Thread
Results 1 to 6 of 6

Help requested: Referencing cells in other sheets using INDIRECT

Hybrid View

  1. #1
    Registered User
    Join Date
    09-30-2013
    Location
    Nelson Bay, Australia
    MS-Off Ver
    Excel 2003
    Posts
    28

    Help requested: Referencing cells in other sheets using INDIRECT

    Hi everyone, just after a bit of help with applying my inderict formula to the rest of the cells in my sheet properly.

    I am getting the values of cells in other sheets, using INDIRECT to use cell values to name the sheets.

    Here is an example of how the cells are now...

    A B
    1 Sheet 1 =(INDIRECT("'"&A1&"'!$A$5"))
    2 Sheet 2 =(INDIRECT("'"&A2&"'!$A$5"))
    3 Sheet 1
    4 Sheet 2
    5 Sheet 1


    The formulas in B1 are going to return the value of A5 in "Sheet 1" (or whatever value is in A1) and B2 will return the vale cell A5 in 'Sheet 2. The next line will be the value of A6 in Sheet 1, and the next will be A6 in Sheet 2 and so on.

    So I have quite a few rows to get through I want to be able to autofill so it looks like this...

    A B
    1 Sheet 1 =(INDIRECT("'"&A1&"'!$A$5"))
    2 Sheet 2 =(INDIRECT("'"&A2&"'!$A$5"))
    3 Sheet 1 =(INDIRECT("'"&A3&"'!$A$6"))
    4 Sheet 2 =(INDIRECT("'"&A4&"'!$A$6"))
    5 Sheet 1 =(INDIRECT("'"&A5&"'!$A$7"))

    As it is now, when I autofill, it autofills the Sheet name part of it. It is looking like this...
    A B
    1 Sheet 1 =(INDIRECT("'"&A1&"'!$A$5"))
    2 Sheet 2 =(INDIRECT("'"&A2&"'!$A$5"))
    3 Sheet 1 =(INDIRECT("'"&A3&"'!$A$5"))
    4 Sheet 2 =(INDIRECT("'"&A4&"'!$A$5"))
    5 Sheet 1 =(INDIRECT("'"&A5&"'!$A$5"))




    Excel isn't intuitive enough to know I want to move cells in the referenced sheet.



    I've tried to play around with the formula but am having problems.

    Can anyone help?

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Help requested: Referencing cells in other sheets using INDIRECT

    Why not have a helper column for the cell number and letter as well, so you can just concatenate the sheetName and Cell ref into ONE cell then indirect to THAT ont cell?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    02-09-2014
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    84

    Re: Help requested: Referencing cells in other sheets using INDIRECT

    =(INDIRECT("'"&A1&"'!$A$"&ROW(A5)))

    Try this:
    row(a5) will return the number five and
    by dragging down it will increase by 1 automatically

  4. #4
    Registered User
    Join Date
    09-30-2013
    Location
    Nelson Bay, Australia
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Help requested: Referencing cells in other sheets using INDIRECT

    Quote Originally Posted by vogel997 View Post
    =(INDIRECT("'"&A1&"'!$A$"&ROW(A5)))

    Try this:
    row(a5) will return the number five and
    by dragging down it will increase by 1 automatically
    This works as you've described, but I need it to increase by one every 2 rows (see example in original post) not every single row.

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Help requested: Referencing cells in other sheets using INDIRECT

    Quote Originally Posted by vonRobbo View Post
    This works as you've described, but I need it to increase by one every 2 rows (see example in original post) not every single row.

    this is why it is easier to attach a sample workbook and you explain exactly what it is you are looking for so we can solve one problem, not many LIKE your problem because you left pieces of the puzzle out.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Help requested: Referencing cells in other sheets using INDIRECT

    You will have to play with this to get it started where you need it, but build this into the last part of your formula, it will cause an increase of 2 every 2 rows..

    =ROW()-MOD(ROW(),2)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. HELP - Referencing cells from different sheets using fixed increment
    By faisy110 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-04-2014, 07:14 PM
  2. Maintain Formatting when referencing cells from other sheets
    By joninmal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2010, 05:10 AM
  3. Replies: 13
    Last Post: 08-03-2009, 12:20 PM
  4. [SOLVED] formula referencing same cells but different sheets
    By jmosso in forum Excel General
    Replies: 2
    Last Post: 02-21-2008, 02:40 PM
  5. [SOLVED] Referencing cells on non-active sheets
    By KellyB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2005, 03:06 PM

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