+ Reply to Thread
Results 1 to 8 of 8

Drag and Drop with formulas

  1. #1
    Forum Contributor
    Join Date
    06-20-2012
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    381

    Drag and Drop with formulas

    Hello,

    I have a selection of cells that has a value that is subtracting from a total value. There is a simple A1-B1 formula to take one value from the other.
    If I drag and drop those cells into a different order I would like the formula to take this into account and subtract the new value when a drag and drop has been made. But for some reason when I do this the formula continues to look at the original cell.

    For example,

    A
    1 - 1000

    B
    1 - 500 (formula = A1-B1) = 500
    2 - 200
    3 - 300
    4 - 400

    If I drag B3 into B1's position the formula should still subtract A1-B1 but produce a result of 700.

    Any ideas on how to resolve this?

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Drag and Drop with formulas

    Have you got $ signs in your formulas ?
    They will absolute the function cell references ...

    The other point is the difference between copy/paste and cut/paste ... copy changes the reference, cut doesn't
    Elegant Simplicity............. Not Always

  3. #3
    Forum Contributor
    Join Date
    06-20-2012
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    381

    Re: Drag and Drop with formulas

    I've got the $ sign. It doesn't seem to alter the results of the formula when I move cells around though. In fact the absolute function doesn't seem to work how I'd expect as it's still altering the cell reference it's looking at.

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Drag and Drop with formulas

    I think the function in B1 should read = $A$1-B1
    And that should paste/autofill ok ... If not can you upload your sheet ?

  5. #5
    Forum Contributor
    Join Date
    06-20-2012
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    381

    Re: Drag and Drop with formulas

    I've attached the sheet I'm working on.
    G27-G37 has the formula.

    If I'm moving cells B30:F30 for example the formula should be reading the change in data bit it's not!
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Drag and Drop with formulas

    drag and drop.xlsx

    Here you go..I think it must be your drag/drop techniqu cos if you copy range G27 and then paste it down, it works fine

  7. #7
    Forum Contributor
    Join Date
    06-20-2012
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    381

    Re: Drag and Drop with formulas

    Hmmm curious...

    I'm selecting the cell range and holding shift to drag down. Is that the right way?

  8. #8
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Drag and Drop with formulas

    It should be if you drag from the bottom right corner..

+ 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