+ Reply to Thread
Results 1 to 5 of 5

Returning a cell reference to include in a forumula

  1. #1
    Registered User
    Join Date
    06-15-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Returning a cell reference to include in a forumula

    I would like to lookup a value and return the cell reference for that matching value and then use that reference in a sum formula. I would like to include it all in one forumula.

    Any help would be appreciated.

    Many Thanks

    Hesh

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Returning a cell reference to include in a forumula

    Well, that doesn't give us a lot to go on, so do the research yourself - use XL Help to look for MATCH, ADDRESS, INDIRECT, INDEX, all of which might be used in this case.

    Pete

  3. #3
    Registered User
    Join Date
    06-15-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Returning a cell reference to include in a forumula

    Sorry wasn't meaning to be lazy, but I am guilty of not providing information.

    I had already attempted to use the match function which did return the row number that I required, I then attempted to concatente the return row number in to a sum formula which didn't work example

    =SUM(A47concatenate("A",MATCH(C2,'Period Info'!B:B,'Period Info'!A:A))))

    Thinking that the concatenate was only a text thing, I was then stumped as to how to get the A column reference (which is know) to merge with the returned row reference.

    For information the A47 cell reference is a substitute linked cell (for ease of creating the forumla) and I hope to use a correct formula on both sides of the sum : , because both sides will rely on the returned cell reference.

    Please dont laugh at the concatenate attempt, I was trying :-)

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Returning a cell reference to include in a forumula

    Well, assuming that the A47 is fixed for now, you could use this:

    =SUM(INDIRECT("A47:A"&MATCH(C2,'Period Info'!B:B,0)))

    assuming that with your MATCH function you want the row where C2 can be found in column B of the Period Info sheet.

    You can do a similar thing to get rid of the 47, i.e.:

    =SUM(INDIRECT("A"&new_match_function&":A"&MATCH(C2,'Period Info'!B:B,0)))

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    06-15-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Returning a cell reference to include in a forumula

    Thanks for this Pete, worked just as you stated.

    Sorry for the delay replying, really appreciated.

    Hesh

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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