+ Reply to Thread
Results 1 to 8 of 8

Cell references in formula keep changing when moving data in referenced cells

  1. #1
    Registered User
    Join Date
    11-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Cell references in formula keep changing when moving data in referenced cells

    Im using "=AVERAGE(F5:F7,F25:F27)" to find the average of just these six cells, however, I need to paste data in from another program and then drag some of it down a few cells so the right numbers end up in the F25:F27 range. Because of the nature of the data its not possible to have it automatically line up in the correct cells, i.e. there are ifferent number of data points each time often with repeated values etc.

    The problem is that when I drag part of the data down so the values I want end up in F25:F27 excel adjusts the formula so the target range (F25:F27) is also moved down by the same number of cells as I have just dragged the data.

    I have tried absolute references and the "INDIRECT" function (although im not sure if im using this correctly) but neither seems to make any difference.

    Can anyone tell me what I need to do to the formula so the references are totally fixed??

    Thanks

  2. #2
    Registered User
    Join Date
    11-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Cell references in formula keep changing when moving data in referenced cells

    Forgot to update my profile, I am actually using office 2007 now.

  3. #3
    Registered User
    Join Date
    01-18-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Cell references in formula keep changing when moving data in referenced cells

    what program are you dragging the information from? is it possible to just paste the info in to the sheet? it sounds like it is creating cells for your information when you drag it in.

  4. #4
    Registered User
    Join Date
    11-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Cell references in formula keep changing when moving data in referenced cells

    Im copying and pasting from EcoWatch. At the moment Im doing it in two separate cut and pastes to avoid draging the data around in excel.

    I would prefer if the references in the formula could be set so they don't change that way I could just paste all the data in together and move it around in excel. This would also be safer if other people end up using the sheet too, so none of the formulas can be accidentally changed.

  5. #5
    Registered User
    Join Date
    01-18-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Cell references in formula keep changing when moving data in referenced cells

    well if you used absolute references and it still changed then its as issue with the pasting. Maybe try pasting it do a different sheet then moving it either with a simple formula or cutting and pasting to match destination formating.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Cell references in formula keep changing when moving data in referenced cells

    Try this...

    =AVERAGE(INDIRECT("F5:F7"),INDIRECT("F25:F27"))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Registered User
    Join Date
    11-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Cell references in formula keep changing when moving data in referenced cells

    Perfect! I was obviously doing something wrong when trying to use INDIRECT.

    One other question, I noticed when using that formula and clicking on the formula bar the range does not get hilighted on the sheet, is there a way to show up the referenced range? No real problem but just makes it easier to go through and double check all cell references are correct.

    Thanks!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Cell references in formula keep changing when moving data in referenced cells

    The reason it doesn't highlight the ranges is because Excel doesn't know those are the ranges until the formula calculates.

    You'll notice that the cell ranges are quoted:

    ("F5:F7")
    ("F25:F27")

    That causes them to be evaluated as text strings until the formula calculates then they're evaluated as normal range references.

    With that being said, I don't know how to get Excel to highlight those ranges in this application (if it can be done).

+ 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