+ Reply to Thread
Results 1 to 6 of 6

Applying Data Validation to Allow Only Formulas

  1. #1
    Registered User
    Join Date
    03-11-2008
    Posts
    31

    Applying Data Validation to Allow Only Formulas

    Hi everyone,

    Is there way in excel to allow entry in a cell to be a formula only through data validation?
    Last edited by loverfellow; 12-02-2015 at 02:28 AM.

  2. #2
    Registered User
    Join Date
    11-18-2015
    Location
    Madrid
    MS-Off Ver
    2016
    Posts
    95

    Re: Applying Data Validation to Allow Only Formulas

    Hi!

    This short VBA code, in the worksheet object, can do the work. In this case it is only for Column A (as an example):

    Please Login or Register  to view this content.
    excelbat.com: free Excel tools, macros...

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,541

    Re: Applying Data Validation to Allow Only Formulas

    Your profile does not say what version of Excel. If you are using 2013 or later, you might be able to use Data Validation -> custom -> formula is =ISFORMULA(A1)=true to force entry of a formula in A1. I cannot test it in my older version of Excel, since the ISFORMULA() function does not show up until Excel 2013. Something like that should be able to work. Event code like that proposed might be the best way if you need it to be compatible with pre2013 versions of Excel.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    03-11-2008
    Posts
    31

    Re: Applying Data Validation to Allow Only Formulas

    Quote Originally Posted by MrShorty View Post
    Your profile does not say what version of Excel. If you are using 2013 or later, you might be able to use Data Validation -> custom -> formula is =ISFORMULA(A1)=true to force entry of a formula in A1. I cannot test it in my older version of Excel, since the ISFORMULA() function does not show up until Excel 2013. Something like that should be able to work. Event code like that proposed might be the best way if you need it to be compatible with pre2013 versions of Excel.
    Thanks a lot man, I am using Excel 2013 and your simple idea worked wonders.

  5. #5
    Registered User
    Join Date
    03-11-2008
    Posts
    31

    Re: Applying Data Validation to Allow Only Formulas

    Quote Originally Posted by excel_bat View Post
    Hi!

    This short VBA code, in the worksheet object, can do the work. In this case it is only for Column A (as an example):

    Please Login or Register  to view this content.
    Thanks buddy for the solution. I will keep it handy for a future reference.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,541

    Re: Applying Data Validation to Allow Only Formulas

    If that was useful, I might suggest the following help file (I never use data validation, so this is where I got the idea): https://support.office.com/en-us/art...0-f010b1159828

+ 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] Applying custom data validation to multiple columns
    By D_N_L in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-21-2014, 05:11 AM
  2. retroactively applying formulas to existing data
    By jacquelineb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-06-2013, 10:01 AM
  3. Formulas in 'Data Validation'
    By Snowmonster in forum Excel General
    Replies: 4
    Last Post: 08-27-2011, 12:30 PM
  4. Applying formulas to lots of data
    By Trothwell in forum Excel General
    Replies: 5
    Last Post: 07-20-2009, 08:56 AM
  5. Replies: 2
    Last Post: 04-03-2009, 02:17 PM
  6. Applying Conditional Formatting to Data Validation
    By kcstewart in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-28-2007, 06:46 PM
  7. Replies: 5
    Last Post: 09-10-2005, 08:07 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