+ Reply to Thread
Results 1 to 7 of 7

can i search on headersName and lock the entire column of a particaular Header

  1. #1
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    can i search on headersName and lock the entire column of a particaular Header

    currently using code to accessing data from the mysqldatabase

    BMS_ID,Itemnum,Original Mfg Name,Original Mfg Part #,Original Supplier Name,Original Supplier Part #,Original_Description,MFR NAME,MFR PART NO SUPPLIER NAME,SUPPLIER PART NO,NOUN,MODIFIER,NOUN MODIFIER


    Please let me know

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: can i search on headersName and lock the entire column of a particaular Header

    i am trying from past 1 month to write code on search and lock according to HeadersName in my Excelsheet columns

    This are the Common Columns in my excel sheet


    BMS_ID,Itemnum,Original Mfg Name,Original Mfg Part #,Original Supplier Name,Original Supplier Part #,Original_Description

    please let me know

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    7,093

    Re: can i search on headersName and lock the entire column of a particaular Header

    Start by unlocking all the cells in your sheet and then protecting the sheet. This macro will prompt you to enter the column header name and then that column will be locked.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: can i search on headersName and lock the entire column of a particaular Header

    thanks but it locking whole sheet

    but i want to specify multiple columns names in the code itself
    Last edited by baig123; 01-03-2015 at 12:54 AM. Reason: paragraph

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    7,093

    Re: can i search on headersName and lock the entire column of a particaular Header

    If you place the column names in the code, the same columns will be locked each time you run the macro. Is this what you want or will the columns change each time? If you want to lock the same columns each time, I would need to know what those columns are. It would be easier to help if you could attach a copy of your file with a detailed explanation of what you want to. When I tried the code on a dummy sheet, it worked properly.

  6. #6
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: can i search on headersName and lock the entire column of a particaular Header

    columns names changes every time

    that is why i used to search and column

    i have attached my sheet
    Attached Files Attached Files

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    7,093

    Re: can i search on headersName and lock the entire column of a particaular Header

    Please have a look at the attached file. Because the columns you want to lock constantly change, there needs to be a way to choose which columns you want to lock each time. You'll notice on Sheet2 that there are three buttons. Clicking the 'Copy Column Headers' button will copy the column headers from Sheet1 to column A of Sheet2. Once you have done that, put an "x" in column B to mark the columns you want to lock and then click the 'Lock Columns' button. To lock a different set of columns, first click the 'Clear Markers' button and then mark the new set of columns with an "x" and click the 'Lock Columns' button. Remember to start by unlocking all the cells in Sheet1 and then protect the sheet with "password". Hopefully, this work-around will work for you.
    Attached Files Attached Files

+ 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. Add certain text to entire column (except header)
    By Excelsemi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2014, 11:30 AM
  2. [SOLVED] Lock entire column if data has been entered in it
    By bassterro in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2014, 03:25 PM
  3. Search an entire column for a value, return entire row.
    By jdsmith1895 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-06-2012, 12:53 PM
  4. [SOLVED] Search column "header" an print the entire column in another worksheet
    By CassioGodinho in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-22-2012, 01:09 PM
  5. Search entire column, return entire row
    By Chris Gwynne in forum Excel General
    Replies: 0
    Last Post: 08-04-2011, 11:21 AM

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.6.0 RC 1