+ Reply to Thread
Results 1 to 3 of 3

How do you stop excel from incrementing your variables during pasting

  1. #1
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    216

    How do you stop excel from incrementing your variables during pasting

    Hey guys using Office 2010, how can I make a variable stay static, even during a paste across multiple cells in a row? By design Excel increments the variables in a given formula, which usually works great, but what about those times, when you don't want it to, or not all the variables in a given formula?

    Here is my basic formula:

    =Details!H7-E17

    I'm just trying to get the difference between E17:AP17 from Details!H7, but Details!H7 keeps incrementing when I paste it to the proceeding cells adjacent. How do you override this, and only during this particular pasting event? Now the E17 I do want it to continue to increment as normal, but the first variable H7, needs to stay H7.

    If that is easy enough for you guys, then to add to that, H7 can be larger or smaller than E17. I just want to get the difference between the two, without getting the dreaded negative response if H17 is smaller than E17.

    I think that is pretty clear, if not let me know.

    thanks
    Last edited by Modify_inc; 03-26-2011 at 06:33 PM. Reason: Figured it out - $ signs: $H$17

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: How do you stop excel from incrementing your variables during pasting

    Hi

    You need to anchor cell H7 to make it absolute
    Please Login or Register  to view this content.
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: How do you stop excel from incrementing your variables during pasting

    The $ will, when preceding the column will anchor it when dragging across the same row; preceding the row it anchors the row when dragging down a column

    I just want to get the difference between the two
    use
    Please Login or Register  to view this content.
    Ben Van Johnson

+ 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