+ Reply to Thread
Results 1 to 8 of 8

Selective changing of row numbers while dragging/copying a function (or another solution?)

  1. #1
    Registered User
    Join Date
    04-19-2015
    Location
    Warsaw, Poland
    MS-Off Ver
    2010
    Posts
    2

    Selective changing of row numbers while dragging/copying a function (or another solution?)

    First of all - hello to all of you, as I'm new to this forum,

    I need to convert a long column of data into different units. I wrote a converter to do that - I have a cell with a multicoeffictient formula (a 4th order polynomial) and the coefficients in separate cells.

    What I'd like to do is to find an easy way to apply this function to every element of the column.

    I enter the function to convert the first element, but unfortunately when I drag it downwards/copy it to cover the rest of the cells, the function changes the row numbers of every element of the formula - and so it changes not only the argument (which I want to change), but also the coefficients (which I want to stay the same).
    Is there an elegant way to keep some of the row numbers unchanged while dragging a formula?

    I also see another solution (that I also don't know how to introduce). I would keep the formula in a fixed cell (say, A1), and it would use the coefficients (A2-A6) and the argument (A7). Then the formula to convert the cells would have to do something like this:
    "this cell should be equal to what A1 would be with A7 equal to [cell to the left]".
    Is there a way to do such a thing in Excel? (C++ is so much easier )

    There is, of course, the barbaric way to do this - to copy every coefficient into a column of the same length, and then drag the formula anyway, as the changing rows would contain the same coefficients. However, I would really like to avoid such a solution, as it produces an enormous quantity of unnecessary data, and I have way too much of that as it is.

    Thanks in advance for all your help!
    Last edited by eitatetaata; 04-19-2015 at 05:59 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: Selective changing of row numbers while dragging/copying a function (or another soluti

    You're going to have to tell us what the formula is, and which are the coefficients. Ideally, a sample workbook would help set the context.

    You use a dollar sign $ to "lock" or make absolute a column or row. So you could have, $A$1, $A1, A$1, or A1. If you use $A$1 that cell address will not change whether you drag it down or across.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-19-2015
    Location
    Warsaw, Poland
    MS-Off Ver
    2010
    Posts
    2

    Re: Selective changing of row numbers while dragging/copying a function (or another soluti

    Actually, the information that you gave me is enough. I have no idea how I managed to live so many years not knowing about the use of the dollar sign.

    Thank you very much, problem solved!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: Selective changing of row numbers while dragging/copying a function (or another soluti

    You're welcome.

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

    Re: Selective changing of row numbers while dragging/copying a function (or another soluti

    You may find this helpful:

    About cell and range references
    Last edited by Tony Valko; 04-19-2015 at 07:03 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: Selective changing of row numbers while dragging/copying a function (or another soluti

    @Tony: that link doesn't work

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

    Re: Selective changing of row numbers while dragging/copying a function (or another soluti

    Quote Originally Posted by TMS View Post
    @Tony: that link doesn't work
    Hmmm...it used to work.

    OK, edited the post and put in a good working link.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: Selective changing of row numbers while dragging/copying a function (or another soluti


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Problem with copying formula with selective cells
    By brandedadnan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-21-2013, 03:01 PM
  2. Scanning and Selective Copying from CSV to Current Sheet
    By james1080 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2012, 04:17 PM
  3. Replies: 0
    Last Post: 04-26-2012, 10:48 AM
  4. Selective Copying
    By RevJeff in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2011, 03:38 PM
  5. Copying Selective columns
    By Oldjay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 06:05 PM

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