+ Reply to Thread
Results 1 to 5 of 5

Return cell adress

  1. #1
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Return cell adress

    I have a formula that searches for a dynamic string (the value and location of the fiscal quarter and year, which changes every quarter). I need to return the cell location (such as V88) where that string is located.

    My formula is: =INDEX($J88:$IV88,MATCH("*"&$D$88&" "&LOOKUP(MONTH(TODAY()),$B$140:$B$151,$C$140:$C$151),$J$88:$IV$88,0))

    The LOOKUP is returning the current fiscal quarter and year.

    I've tried it with the COLUMN function in front, but that returns the column number, not the alphabetic column reference. I don't want to have to substitute the column alpha version for the column number unless I have to. Also, how do I combine both the row and column reference in the returned value?

    Is there an easy way to return the cell reference?
    Last edited by joodkap; 06-15-2010 at 01:15 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Return cell adress

    A few points

    1 - please PM a a Mod and have this question moved to an appropriate forum (this is a non-Q forum)

    2 - why do you need the address as a literal string ?

    If you really need it - use

    =ADDRESS(88,MATCH("*"&$D$88&" "&LOOKUP(MONTH(TODAY()),$B$140:$B$151,$C$140:$C$151),$J$88:$IV$88,0),4)

    (ie get rid of the outer index)

  3. #3
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Re: Return cell adress

    Excuse my ignorance, but how do I communicate with a moderator? Is PM "private mail"? How is it used?
    ---------------------------------------
    The formula you provided did not give me the correct cell reference. I've attached a stripped down worksheet. Row 88, from column J on, has titles for quarters and fiscal years where there are outstanding receivables. J88 will always be the oldest, but the actual quarter/year will change in that cell.

    Columns C - F (Rows 89 - 137) look at the data in Cols J - end (Rows 89 - 137).
    Currently, the analyst manually examines for the current quarter/year and changes the formulas manually. I am trying to automate the process.

    D88 is manually changed to the current quarter.

    Each of the following refer to rows 89-137:
    - Col C sums all outstanding amounts prior to the current qtr/yr.
    - Col D equals the current quarter/yr.
    - Col E sums C and D
    - Col F sums everything beyond the current qtr/yr


    I'm using this formula in col C:
    =SUM($J89:INDEX($J89:$IV89,MATCH("*"&$D$88&" "&LOOKUP(MONTH(TODAY()),$B$140:$B$151,$C$140:$C$151),$J$88:$IV$88,0)-1))

    Thank you.
    Attached Files Attached Files
    Last edited by joodkap; 06-12-2010 at 01:30 PM. Reason: Attached file

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Return cell adress

    There are some oddities in the above for ex.

    i) why are you using MONTH rather than YEAR today when creating the criteria for your LOOKUP ?

    ii) why is there is no Q1 for 2008 listed in row 88 ?

    Regardless of the above I think you will find you can simplify this approach somewhat.

    A golden rule in Excel is to avoid repetitive calculations so rather conducting the MATCH repeatedly you should calculate once and refer to the result thereafter - on that basis I would suggest:

    D87:
    =MATCH("*- "&D88&" "&YEAR(TODAY()),$J$88:$Z$88,0)

    The above gives you the column of the current quarter.

    Thereafter the remaining functions are relatively straightforward

    C89:
    =IF($D$87=1,0,SUM($J89:INDEX($J89:$Z89,$D$87-1)))
    copied down

    D89:
    =INDEX($J89:$Z89,$D$87)
    copied down

    E89:
    =SUM($C89:$D89)
    copied down

    F89:
    =SUM($J89:$Z89)-$E89
    copied down

  5. #5
    Registered User
    Join Date
    10-30-2008
    Location
    ma
    Posts
    35

    Re: Return cell adress

    Thank you. This was very helpful.

+ 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