+ Reply to Thread
Results 1 to 5 of 5

Copying functions from one cell to other cells

  1. #1
    aaronwexler
    Guest

    Copying functions from one cell to other cells

    I have a question I was hoping someone could help me answer. I have the
    function =IF(I22>M20-1,-M20,IF(J22>M21-1,M21,N22)) in cell M22. Now I would
    like to find a quick way to copy this to cells M23,M24,M25.....and beyond.
    The problem is I want the some of the function to change when I copy it and
    some of it to stay the same. I would like the parts "M20-1,-M20" and
    "M21-1,M21" to stay the same while the other move down with each cell. For
    example in cell M23 (the next cell down in my range) I would like the
    function to read =IF(I23>M20-1,-M20,IF(J23>M21-1,M21,N23)). When I try and
    copy the cell using the drag and drop in the lower right corner of the cell
    it moves all cells in the function down one which is what I want except for
    the two parts I mentioned above. If there anyway to lock those two parts
    into place so I can drag and drop without moving those parts of the function
    down?

  2. #2
    Niek Otten
    Guest

    Re: Copying functions from one cell to other cells

    =IF(I22>M$20-1,-M$20,IF(J22>M$21-1,M$21,N22))

    --
    Kind regards,

    Niek Otten

    "aaronwexler" <[email protected]> wrote in message
    news:[email protected]...
    >I have a question I was hoping someone could help me answer. I have the
    > function =IF(I22>M20-1,-M20,IF(J22>M21-1,M21,N22)) in cell M22. Now I
    > would
    > like to find a quick way to copy this to cells M23,M24,M25.....and beyond.
    > The problem is I want the some of the function to change when I copy it
    > and
    > some of it to stay the same. I would like the parts "M20-1,-M20" and
    > "M21-1,M21" to stay the same while the other move down with each cell.
    > For
    > example in cell M23 (the next cell down in my range) I would like the
    > function to read =IF(I23>M20-1,-M20,IF(J23>M21-1,M21,N23)). When I try
    > and
    > copy the cell using the drag and drop in the lower right corner of the
    > cell
    > it moves all cells in the function down one which is what I want except
    > for
    > the two parts I mentioned above. If there anyway to lock those two parts
    > into place so I can drag and drop without moving those parts of the
    > function
    > down?




  3. #3
    Forum Contributor
    Join Date
    06-23-2004
    Location
    Houston, TX
    Posts
    571
    Quote Originally Posted by aaronwexler
    I have a question I was hoping someone could help me answer. I have the
    function =IF(I22>M20-1,-M20,IF(J22>M21-1,M21,N22)) in cell M22. Now I would
    like to find a quick way to copy this to cells M23,M24,M25.....and beyond.
    The problem is I want the some of the function to change when I copy it and
    some of it to stay the same. I would like the parts "M20-1,-M20" and
    "M21-1,M21" to stay the same while the other move down with each cell. For
    example in cell M23 (the next cell down in my range) I would like the
    function to read =IF(I23>M20-1,-M20,IF(J23>M21-1,M21,N23)). When I try and
    copy the cell using the drag and drop in the lower right corner of the cell
    it moves all cells in the function down one which is what I want except for
    the two parts I mentioned above. If there anyway to lock those two parts
    into place so I can drag and drop without moving those parts of the function
    down?
    In Cell M22, do the following:

    1. Go to your formula and click on the first M20 and press F4
    2. Click on the next M20 and press F4 again
    3. Do the same for the M21's

    You can now drag down your formula until your range requirement is met.

    Regards.
    BenjieLop
    Houston, TX

  4. #4
    RagDyeR
    Guest

    Re: Copying functions from one cell to other cells

    Use the dollar sign ($).

    It's called "absolute reference" - no change while copying
    And "relative reference" - change while copying.

    You can look them up in the Help files.
    They can refer to the column and/or the row.

    =IF(I22>$M$20-1,-$M$20,IF(J22>$M$21-1,$M$21,N22))

    --

    HTH,

    RD
    =====================================================
    Please keep all correspondence within the Group, so all may benefit!
    =====================================================

    "aaronwexler" <[email protected]> wrote in message
    news:[email protected]...
    I have a question I was hoping someone could help me answer. I have the
    function =IF(I22>M20-1,-M20,IF(J22>M21-1,M21,N22)) in cell M22. Now I would
    like to find a quick way to copy this to cells M23,M24,M25.....and beyond.
    The problem is I want the some of the function to change when I copy it and
    some of it to stay the same. I would like the parts "M20-1,-M20" and
    "M21-1,M21" to stay the same while the other move down with each cell. For
    example in cell M23 (the next cell down in my range) I would like the
    function to read =IF(I23>M20-1,-M20,IF(J23>M21-1,M21,N23)). When I try and
    copy the cell using the drag and drop in the lower right corner of the cell
    it moves all cells in the function down one which is what I want except for
    the two parts I mentioned above. If there anyway to lock those two parts
    into place so I can drag and drop without moving those parts of the function
    down?



  5. #5
    aaronwexler
    Guest

    Re: Copying functions from one cell to other cells

    Thanks, that did the trick

    "Niek Otten" wrote:

    > =IF(I22>M$20-1,-M$20,IF(J22>M$21-1,M$21,N22))
    >
    > --
    > Kind regards,
    >
    > Niek Otten
    >
    > "aaronwexler" <[email protected]> wrote in message
    > news:[email protected]...
    > >I have a question I was hoping someone could help me answer. I have the
    > > function =IF(I22>M20-1,-M20,IF(J22>M21-1,M21,N22)) in cell M22. Now I
    > > would
    > > like to find a quick way to copy this to cells M23,M24,M25.....and beyond.
    > > The problem is I want the some of the function to change when I copy it
    > > and
    > > some of it to stay the same. I would like the parts "M20-1,-M20" and
    > > "M21-1,M21" to stay the same while the other move down with each cell.
    > > For
    > > example in cell M23 (the next cell down in my range) I would like the
    > > function to read =IF(I23>M20-1,-M20,IF(J23>M21-1,M21,N23)). When I try
    > > and
    > > copy the cell using the drag and drop in the lower right corner of the
    > > cell
    > > it moves all cells in the function down one which is what I want except
    > > for
    > > the two parts I mentioned above. If there anyway to lock those two parts
    > > into place so I can drag and drop without moving those parts of the
    > > function
    > > down?

    >
    >
    >


+ 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