+ Reply to Thread
Results 1 to 6 of 6

Return cell formula when checkbox = false

  1. #1
    Registered User
    Join Date
    04-16-2019
    Location
    Pittsburgh, PA
    MS-Off Ver
    2016
    Posts
    4

    Return cell formula when checkbox = false

    I am creating a form which allows the user to select items a-la-carte or as a predefined package. One of my cells needs to revert back to a formula when the package is deselected. Here is what I have:

    Please Login or Register  to view this content.
    At issue is the underlined part. How do I enter a formula that fills a cell based on the input of another?

    **EDIT**
    I think I need to clarify what I'm attempting to accomplish. I have the following code assigned to an activeX checkbox:

    Please Login or Register  to view this content.
    I then multiple the result of D22 by 690 and insert it in E22 (the simple formula of =D22*690 is placed in E22). When I run the code in the original post (triggered by an activeX checkbox), it wipes out the formula. I need to revert back to the above formula upon un-checking. Adding the suggested statement displays D22*690 but doesn't act like a formula. 'Show formulas' is not selected. I hope this helps.

    Thank you!
    Last edited by revcall; 04-16-2019 at 01:39 PM. Reason: clarification

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

    Re: Return cell formula when checkbox = false

    Hi & welcome to the board
    How about
    Please Login or Register  to view this content.
    Also please edit your post to add code tags, the # icon in the reply/edit window

  3. #3
    Registered User
    Join Date
    04-16-2019
    Location
    Pittsburgh, PA
    MS-Off Ver
    2016
    Posts
    4

    Re: Return cell formula when checkbox = false

    Thank you for your response! Unfortunately, that places the formula in the cell whereas I need the formula to function, not be displayed.

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

    Re: Return cell formula when checkbox = false

    Please edit your post to include code tags around your code.

    That code does insert the formula into the cell, check that the cell is not formatted as text & that you do not have "Show Formulas" selected.

  5. #5
    Registered User
    Join Date
    04-16-2019
    Location
    Pittsburgh, PA
    MS-Off Ver
    2016
    Posts
    4

    Re: Return cell formula when checkbox = false

    I stand corrected! That DID work! I was short one "=" in the code.

    Thank you for your help!!

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

    Re: Return cell formula when checkbox = false

    Glad it's sorted & thanks for the feedback
    and thanks for adding the code tags.

+ 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: 1
    Last Post: 02-24-2015, 12:14 PM
  2. Replies: 3
    Last Post: 09-28-2014, 08:14 PM
  3. I need my formula to return a blank cell rather than FALSE
    By dnoteman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2014, 03:51 PM
  4. [SOLVED] Make a IF formula return a REAL blank cell if false
    By Stildawn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2012, 11:09 PM
  5. Return True/False if cell contains formula
    By rziegler in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-09-2009, 03:03 PM
  6. Filling in a cell based on Checkbox true/false
    By Rivalwon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2007, 07:07 PM
  7. How do I create a formula to return a blank cell if false?
    By Vivecat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-28-2007, 07:33 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