+ Reply to Thread
Results 1 to 5 of 5

Thread: Specific locked cell formula, autofill problem

  1. #1
    Registered User
    Join Date
    02-22-2010
    Location
    KL
    MS-Off Ver
    Excel 2007
    Posts
    8

    Specific locked cell formula, autofill problem

    Not sure how to name or really describe what I want to achieve so here goes

    Formula : =SUM(G2*G5+H2*H5)+L5+M5

    Where G2 and H2 are the price, G5 and H5 are quantity.


    Problem when dragged at the corner of the cell which copies the content of the first cell :
    =SUM(G3*G6+H3*H6)+L6+M6
    =SUM(G4*G7+H4*H7)+L7+M7
    =SUM(G5*G8+H5*H8)+L8+M8
    and so on..


    What I need to achieve is :
    =SUM(G2*G6+H2*H6)+L6+M6
    =SUM(G2*G7+H2*H7)+L7+M7
    =SUM(G2*G8+H2*H8)+L8+M8

    Where both G2 and H2 remain the same(locked) and others will continue to add itself. I have over 300 rows to fill in the formula of what I need to achieve. I find it really tedious of having to correct the errors made when I use the autofill function, so is there any convenient way that I could achieve the result I wanted? I hope this makes sense to anyone of you.

    Thanks in advance!
    Last edited by Gaedious; 07-15-2010 at 05:24 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,202

    Re: Specific locked cell formula, autofill problem

    Try:

    =SUM($G$2*$G5+$H$2*$H5)+$L5+$M5
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Registered User
    Join Date
    02-22-2010
    Location
    KL
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Specific locked cell formula, autofill problem

    That does the trick. Thank you so much!

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Specific locked cell formula, autofill problem

    Although the Sum function here is redundant in the context you have written...

    Multiplication gets done first, then addition.

    You should use either:

    =$G$2*$G5+$H$2*$H5+$L5+$M5

    or

    =SUM($G$2*$G5,$H$2*$H5,$L5,$M5)
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    02-22-2010
    Location
    KL
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Specific locked cell formula, autofill problem

    I see.. thanks for the recommendation

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0