+ Reply to Thread
Results 1 to 4 of 4

Prevent certain values from being changed when using autofill

  1. #1
    Registered User
    Join Date
    12-22-2018
    Location
    Irving, TX
    MS-Off Ver
    Office 20104
    Posts
    2

    Prevent certain values from being changed when using autofill

    Hi,

    I am working on a spreadsheet that requires addition of certain cells only if the value of another cell is greater than or equal to that of the value of another cell. The example below shows the formula as it pertains to the first row:

    =SUM(262+171+31)+(IF(F23>=F11,F11,0))+(IF(H23>=H11,H11,0))+IF(J23>=J11,J11,0)+IF(K23>=K11,K11,0)+IF(L23>=L11,L11,0)+IF(M23>=M11,M11,0)+IF(N23>=N11,N11,0)

    So, basically, if the value of F23 is greater or equal to F11, then I want to add F11. Ergo, if F23 is less than F11, I don't want it to be included. The same goes for H, I, J and so forth.

    I need the values of the subsequent cells in a series, say, F24, F25, etc., to only be added if they >= F11. What the autofill is doing is advancing the cells from F23 to F24, F25, and so on, (which is what I want), but it's also advancing the cells starting at F11, so it looks like this:

    =SUM(262+171+31)+(IF(F24>=F12,F12,0))+(IF(H24>=H12,H12,0))+IF(J24>=J12,J12,0)+IF(K24>=K12,K12,0)+IF(L24>=L12,L12,0)+IF(M24>=M12,M12,0)+IF(N24>=N12,N12,0)

    I need the formula above to read:

    =SUM(262+171+31)+(IF(F24>=F11,F11,0))+(IF(H24>=H11,H11,0))+IF(J24>=J11,J11,0)+IF(K24>=K11,K11,0)+IF(L24>=L11,L11,0)+IF(M24>=M11,M11,0)+IF(N24>=N11,N11,0)



    I have about 35 to 40 rows to complete, so manually adjusting those formulas will take some time. I'm hoping there's a way for Excel to recognize the pattern (that row 11 remains constant, while rows 23 onward are advanced by one).

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Prevent certain values from being changed when using autofill

    Hi & welcome to the board
    try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-22-2018
    Location
    Irving, TX
    MS-Off Ver
    Office 20104
    Posts
    2

    Re: Prevent certain values from being changed when using autofill

    Worked perfectly, thank you so much!

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Prevent certain values from being changed when using autofill

    You're welcome & thanks for the feedback

+ 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. Prevent formula from being changed
    By Minsh in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-24-2016, 08:24 AM
  2. Replies: 6
    Last Post: 04-10-2015, 03:50 PM
  3. How to prevent autofill with ranges
    By Rob K in forum Excel General
    Replies: 3
    Last Post: 05-16-2014, 03:42 AM
  4. Can I prevent a cell or range from being changed based on a date?
    By lenstwo2 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-09-2013, 11:48 PM
  5. macro to autofill entire row when a column in the sheet is changed
    By kbaruin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2012, 03:44 AM
  6. How to prevent autofill of data
    By marvinks in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-27-2007, 11:23 PM
  7. how do i prevent data from being changed when i sort excel column
    By world's in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-17-2006, 06:30 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