+ Reply to Thread
Results 1 to 3 of 3

Is something like IF(Worksheet=Protected, "X", "Y") possible?

  1. #1
    Registered User
    Join Date
    11-14-2014
    Location
    Austin, TX
    MS-Off Ver
    2013
    Posts
    1

    Is something like IF(Worksheet=Protected, "X", "Y") possible?

    Hello,
    for a given cell, I want to display "TEXT-A" if the worksheet is protected, and "TEXT-B" if the worksheet is not protected. Is there a logical_test for determining if the worksheet is protected or not?

    Thanks,
    Ed

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,672

    Re: Is something like IF(Worksheet=Protected, "X", "Y") possible?

    You could use a user-defined function:

    Please Login or Register  to view this content.
    E..g.,

    =IF(IsProtected(), "Yup", "Nope")

    But changing the protection won't cause the formula to recalculate. It will calculate when you change any cell, though.
    Last edited by shg; 11-14-2014 at 06:17 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,672

    Re: Is something like IF(Worksheet=Protected, "X", "Y") possible?

    Or you could use the XL4 macro Get.Document(7, "Sheet1")

+ 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. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  2. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  3. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  4. Replies: 5
    Last Post: 06-26-2006, 09:23 PM
  5. Replies: 7
    Last Post: 05-13-2006, 05:02 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