+ Reply to Thread
Results 1 to 10 of 10

A way to get the cell references in a formula change

  1. #1
    Registered User
    Join Date
    02-02-2006
    Location
    Sydney . Australia
    MS-Off Ver
    2007 and 2013
    Posts
    98

    A way to get the cell references in a formula change

    Is there a way of getting the cell references in a formula change following a change in the content of a cell in the worksheet ?? Please see attached file.
    Any help will be much appreciated
    Attached Files Attached Files
    Last edited by Michael6; 09-09-2009 at 05:46 AM.

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

    Re: A way to get the cell references in a formula change

    I think you need to clarify in terms of whether or not the value in I8 is an any way tied to the data table - ie is January actually listed anywhere or are you simply saying that you interpret each "block" of data in your table to be associated with a month, ie first block is Jan, second block is Feb etc... your life would be a lot easier if Jan, Feb etc were listed alongside the transactions in your table.

  3. #3
    Registered User
    Join Date
    02-02-2006
    Location
    Sydney . Australia
    MS-Off Ver
    2007 and 2013
    Posts
    98

    Re: A way to get the cell references in a formula change

    DonkeyOte, Thanks for your reply.
    Actually, value in cell I8 is not tied up to the data table, and each block is associated with a month. When, say, March is entered in cell I8, the range in the formula should start at a different row from that when a different month is entered. But if that makes it difficult as you hinted, I wonder if I can do any modification to make it easier to arrive at a solution. I will be glad if you can give me a suggestion.

  4. #4
    Registered User
    Join Date
    02-02-2006
    Location
    Sydney . Australia
    MS-Off Ver
    2007 and 2013
    Posts
    98

    Re: A way to get the cell references in a formula change

    This new attachment represents the actual worksheet more closely.
    Attached Files Attached Files

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

    Re: A way to get the cell references in a formula change

    Using your sample file:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-02-2006
    Location
    Sydney . Australia
    MS-Off Ver
    2007 and 2013
    Posts
    98

    Re: A way to get the cell references in a formula change

    DonkeyOte, Thank you very much. Your formula works like magic to me. It solved the problem perfectly. But I am now encouraged to add one more question. Could you please give the formula to work out the average per week (for each item), in a column I want to add beside the SUM column. Each row in the range represents a week. To devide the SUM by the number of weeks (to get the average), I was deviding by [MAX(($A$8:$A$60=F8)*ROW($A$8:$A$60))-7), which has now to be modified accordingly.

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

    Re: A way to get the cell references in a formula change

    If the SUM value is in G8 etc then perhaps:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-02-2006
    Location
    Sydney . Australia
    MS-Off Ver
    2007 and 2013
    Posts
    98

    Re: A way to get the cell references in a formula change

    Thank you again. I appreciate your help.
    The problem is now solved.
    Regards
    Michael

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

    Re: A way to get the cell references in a formula change

    Quote Originally Posted by Michael6
    Hallo,
    In your last reply to my question regarding the averages, the code you suggested gives the average that is equal to [the sum of the values of each item divided by the number of times the item appears in the table.] But what is actually required is the weekly average of each item, which is [the sum divided by the number of rows from the start of the month in G4 to the last entry of the item in the table]. The main issue is the row number of the last entry of each item less the row number of the start of the sum range (which changes as a different month is entered in cell G4).
    Sorry to bother you, but I can't see any other way after all the unsuccessful attempts I made to sort out this issue myself.
    Regards
    Michael
    Given amount of repetitive calcs being performed (match of Month) I would suggest the following revisions (using your last sample file)

    Please Login or Register  to view this content.
    *H4 provides the match of month number which is used consistently in latter calcs - better in XL to calc once, store & refer to the result via cell reference than repeatedly calc in each formula given the result is "constant" (ie does not change per calculation)

  10. #10
    Registered User
    Join Date
    02-02-2006
    Location
    Sydney . Australia
    MS-Off Ver
    2007 and 2013
    Posts
    98

    Re: A way to get the cell references in a formula change

    Thank you very much. I've just tried the new formulas and they work perfectly.
    The problem is now definitely solved.

+ 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