+ Reply to Thread
Results 1 to 3 of 3

Constructing a cell reference with a formula

  1. #1
    Registered User
    Join Date
    03-02-2015
    Location
    Arizona
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO
    Posts
    14

    Constructing a cell reference with a formula

    In sheet1!A1, I have the text "Cat"

    In sheet 2, column 5 is labeled "Cat" in E1

    In sheet 1, I have complex formulas that reference the range 'sheet2'!$E$2:'sheet2'!$E$300


    I already have a formula that finds the column number of Cat in sheet2 and turns it into a letter, E.

    The problem is how do I replace the two E's in this reference... 'sheet2'!$E$2:'sheet2'!$E$300 ...with that formula? Is there a way I can insert it using concatenation?

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Constructing a cell reference with a formula

    =SUM(Sheet2!E1:E300)

    Becomes

    =SUM(Indirect("Sheet2!" & E & "1:" & E & "300"))

    =LET(E,"E",SUM(INDIRECT("Sheet2!" & E & "1:" & E & "300")))
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Constructing a cell reference with a formula

    you can use an INDIRECT() to convert the formulas into something that uses that address range
    concatenate will join
    Not sure what formula you are using to get the E

    Indirect( "'sheet2'!$"& formula for E & "'$2:'sheet2'!$"& formula for E & "$300" )

    But you dont need to refer to the sheet twice

    you maybe able to just use ADDRESS() with a FIND "CAT" to get E
    Last edited by etaf; 11-25-2021 at 07:43 AM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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. Problem constructing Conditional Formatting Formula
    By thefallofrome in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2019, 11:29 AM
  2. Need Help Constructing External Reference With Variables
    By tsmedley in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-05-2017, 07:35 PM
  3. Replies: 2
    Last Post: 03-12-2012, 01:56 PM
  4. Constructing an array reference with CONCATENATE
    By lauraleff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-22-2011, 02:10 PM
  5. Replies: 13
    Last Post: 01-20-2010, 05:54 PM
  6. [SOLVED] Problem constructing a SUM formula
    By Alf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2009, 01:30 PM
  7. Constructing a Cell Reference
    By AthleteTO in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-19-2005, 08:30 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