+ Reply to Thread
Results 1 to 5 of 5

Changing the Row value in a formula based on value in another cell

  1. #1
    Registered User
    Join Date
    09-11-2013
    Location
    sydney
    MS-Off Ver
    Excel 2003
    Posts
    11

    Changing the Row value in a formula based on value in another cell

    I am trying to build a dynamic formula where the row value changes based on the number value in another cell.

    My first effort to write the formula was
    =a"b2"

    The data is in row A

    The number variable is in cell b2. So if the value is B2 was "12" the formula would show me the value of A12

    I want to use it to bring up a single row of data by entering the row number in a single cell.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,310

    Re: Changing the Row value in a formula based on value in another cell

    Have a look at the INDIRECT function.

    Administrative Note:

    Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-11-2013
    Location
    sydney
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Changing the Row value in a formula based on value in another cell

    All good figured it out. Indirect is my friend.
    =INDIRECT("a"&b2)

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Changing the Row value in a formula based on value in another cell

    C2 =indirect("a"&b2)
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,310

    Re: Changing the Row value in a formula based on value in another cell

    Glad to have helped.

    Please check and update your forum profile!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered 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. Formula to do Numbering Based on a Changing Number in a Cell (A1)
    By bjnockle in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2021, 01:00 AM
  2. [SOLVED] Run goal seek based on changing cell value (that is a formula result)
    By Phillycheese5 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-31-2018, 01:55 PM
  3. [SOLVED] Changing range of max() formula based on a cell contents
    By Mr_Phil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-17-2018, 07:14 PM
  4. Changing a cell reference in formula based on its position and not the active cell
    By Glovaldo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2017, 07:10 AM
  5. Changing Formula based on what is in the target cell
    By 5upgraphics in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-02-2014, 05:54 PM
  6. Formula for changing a cell based on a filter.
    By darkunderdog in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-03-2006, 10:11 PM
  7. Replies: 2
    Last Post: 03-12-2006, 03:50 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