+ Reply to Thread
Results 1 to 2 of 2

Need to lock formulas in a specific column so macro will not affect it

  1. #1
    Registered User
    Join Date
    01-20-2016
    Location
    Texas
    MS-Off Ver
    2013
    Posts
    1

    Need to lock formulas in a specific column so macro will not affect it

    Im very new to Macros and this is my 1st time to post a question.

    I have a macro that splits data(leads) by type into different sheets. I then have a different formula to input in the last column so the leads are evenly distributed (within each sheet) amongst 11 people:

    =INDEX(Summary!$A$3:$A$13,INT((ROWS(Z$1:Z2)-2)*11/COUNTIF('Exotic Luxury'!$C$2:$C$10000,"Exotic Luxury")+1))

    Only catch is that when I run the macro, it deletes the formula from the last column.

    Is there any way I can lock my formula so i dont have to copy and paste it after every time the macro runs? I've included my macro below for reference.
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. I also recommend indenting your code to show the structure. --6StringJazzer

    Any help is appreciated!
    Last edited by 6StringJazzer; 01-21-2016 at 05:29 PM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Need to lock formulas in a specific column so macro will not affect it

    Should the formula stay exactly the same for each sheet, or does it need to be changed to reflect the new sheet names (where bolded)?


    =INDEX(Summary!$A$3:$A$13,INT((ROWS(Z$1:Z2)-2)*11/COUNTIF('Exotic Luxury'!$C$2:$C$10000,"Exotic Luxury")+1))

    Your macro code is kind of hard to understand without the workbook it is used on, or any in-depth description of what you want it to do....
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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] Using a macro or formulas or both to cull specific row and column data from database table
    By telcocook in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-17-2015, 11:53 AM
  2. Macro to lock button with specific criteria
    By tanay.vinod in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2014, 11:23 PM
  3. Is there an easy way to lock all formulas to the specific cell?
    By mcmuney in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-12-2013, 01:26 AM
  4. [SOLVED] Conditional Formatting / Macro to affect specific string within a cell
    By xandermacleod in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2012, 02:06 PM
  5. [SOLVED] I have to lock specific cells whch contains formulas.
    By satputenandkumar0 in forum Excel General
    Replies: 3
    Last Post: 11-12-2012, 08:03 AM
  6. Lock particular column with hiding formulas with other columns being active
    By sanjeevkumarmc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-23-2012, 01:45 AM
  7. [SOLVED] Sorting does not affect Formulas
    By galfam in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-10-2012, 07:55 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