+ Reply to Thread
Results 1 to 7 of 7

Auto fill data with INDIRECT formula

  1. #1
    Registered User
    Join Date
    07-23-2013
    Location
    ljubljana, Slovenia
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    19

    Auto fill data with INDIRECT formula

    Hi.

    I have a formula in my excel, which I want to extend down and to the right.

    =INDIRECT($B$2&"!T3252")

    In B2 I have a drop-down with different countries, which match the tab names. So, If I select 'Germany' in B2, the formula returns the content of the cell T3252 from tab 'Germany' ... You get the picture.

    What I would like, is to copy the formula down and to the right, so it will return the content of T3253 in the cell bellow and U3252 in the cell to the right.

    How can I do that?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Auto fill data with INDIRECT formula

    =INDIRECT($B$2&"!"&ADDRESS(ROW(T3532),COLUMN(T1))) should do it
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Auto fill data with INDIRECT formula

    Try this
    =INDIRECT($B$2&"!" & ADDRESS(ROWS($A$1:$A3252),COLUMNS($A$1:T$1)))

    Dang you Martin. I'm too slow.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    07-23-2013
    Location
    ljubljana, Slovenia
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    19

    Re: Auto fill data with INDIRECT formula

    Thank you for the response, but this doesn't seem to work. It should, though, since I got two the same answers

    The formula does not return any values, it only shows the formula itself.
    The fx button indicates an error in the 'address' part of the formula.

    I am sorry if there is some stupid mistake I make every time, which causes the problems

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Auto fill data with INDIRECT formula

    Try this...

    =INDIRECT($B$2&"!"&CELL("address",T3252))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Auto fill data with INDIRECT formula

    Quote Originally Posted by glosos View Post

    The formula does not return any values, it only shows the formula itself.
    That sounds like the cell is formatted as TEXT.

    Change the cell format to General then re-enter the formula.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Auto fill data with INDIRECT formula

    also you might need to replace the comma , with a semicolon ;

  8. #8
    Registered User
    Join Date
    07-23-2013
    Location
    ljubljana, Slovenia
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    19

    Re: Auto fill data with INDIRECT formula

    It was the comma!

    Thank you so much for a quick response by everybody!

+ 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. Formula Auto fill incorrect cell data
    By TurnDevil in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-16-2013, 05:21 PM
  2. Auto-fill formula upon data entry
    By rlbush2 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 12-21-2012, 12:41 AM
  3. Replies: 11
    Last Post: 04-22-2012, 09:14 AM
  4. auto fill an indirect formula
    By teledweller in forum Excel General
    Replies: 7
    Last Post: 11-03-2010, 08:58 AM
  5. Auto Fill formula with growing data
    By chrispulliam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2010, 01:39 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