+ Reply to Thread
Results 1 to 9 of 9

Allowing manual entering in cells with formulas

  1. #1
    Registered User
    Join Date
    10-04-2018
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    58

    Allowing manual entering in cells with formulas

    Hello!

    So I found this very cool thread on here called Allowing Users to Input Data into Cells Containing Formulas without Deleting the Formula. The thread was marked as solved but I am having trouble making it work for me. I am hoping someone can help me.

    The thread teaches us how to override a formula in a cell and then when we delete the override, the original formula goes back. This is the explanation:
    Re: Allowing Users to Input Data into Cells Containing Formulas without Deleting the Formula
    I think I figured it out. I don't mean to step on your toes ChemistB, but this is a pretty sweet idea and I'd like to make it work too.

    I right clicked on Template tab and made a copy. I named it Template - Hidden.

    Back in VB land I pasted this onto Template's sheet. (the original)

    Copy to clipboard
    Please Login or Register  to view this content.
    Then I added Conditional Formatting to C1 as formula: =NOT(Template!C1='Template - Hidden'!C1)

    and then used the Format Painter to spread it everywhere else.

    All that's left is to hide the 'Hidden' sheet. Did I miss anything?
    I did all of this and I am getting an error with my formula. When I clear the original cell I can type in whatever, and then when I delete that to make it go back to the original, it gives me an error and asks me to debug the error. I do that and it tells me this line is wrong: Target.Formula = Sheets("Template - Hidden").Cells(Target.Row, Target.Column).Formula
    What do I do???

    I attached a copy of the workbook to help.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 10-29-2018 at 08:27 PM. Reason: Added QUOTE tags and CODE tags

  2. #2
    Registered User
    Join Date
    10-04-2018
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    58

    Re: Allowing manual entering in cells with formulas

    Just another note: My range is C7:C46 and in these cells I have numbers like T009, T083, T890 like product numbers... Could this be the problem? So maybe I need to change this line: If Target.Count > 1 Then Exit Sub to not be >1?

    Basically I have a list of product numbers that are being pulled from another worksheet with a look formula.What I want to write is a code that allows someone to clear that cell and type in a new product number. Then if they remove their typing, the cell reverts back to the original number using the original formula...
    Last edited by cwelsh; 10-29-2018 at 08:54 PM.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,158

    Re: Allowing manual entering in cells with formulas

    .
    You are referring to this post : https://www.excelforum.com/excel-for...ml#post3621420


    I tried your workbook here and it works as expected. Not certain why you are receiving an error on your end.

  4. #4
    Registered User
    Join Date
    10-04-2018
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    58

    Re: Allowing manual entering in cells with formulas

    The workbook is from the original post. I want to apply that to mine and make it work like the workbook I attached.

    The problem I am running into is that I copied and pasted the VB code and adjusted the range and reference sheet and I get an error... Mine isn't working like it should...

  5. #5
    Registered User
    Join Date
    10-04-2018
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    58

    Re: Allowing manual entering in cells with formulas

    If anyone knows why mine is not working like the original post I copied from, it would be soooo much appreciated!

    I know the workbook I attached is working...that is the one in the post I found and I copied the VB code from. When I copied the code over to my workbook which uses range C7:C46 with product numbers using a formula pulling from another sheet , it doesn't work.

    The only reasons I can think of is that the example workbook and code uses numbers and my product codes start with T? If anyone can help me rewrite the VB code to make it so that the following occurs that would be great!

    What I need:

    An exact copy of sheet one is copied into sheet2 (which is a hidden sheet). When you enter data into C7:C46 it will stick,but if you delete what you entered the code looks to see if it's blank.
    If it is, it goes to that same cell on sheet2 and copies the formula back into sheet1.

    The formulas are in column C.
    I used conditional formatting to change the cell color if any of these don't follow the formula. If the user, clears the cell, or backspaces to clear the cell, the old formula will reappear.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,158

    Re: Allowing manual entering in cells with formulas

    .
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-04-2018
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    58

    Re: Allowing manual entering in cells with formulas

    Thank you, but it still doesn't work... Could it be because my original formula is an array formula? It allows me to type into the cell, and then when I erase it, the formula comes back non array and gives me a 0.
    Last edited by cwelsh; 10-30-2018 at 08:13 AM.

  8. #8
    Registered User
    Join Date
    10-04-2018
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    58

    Re: Allowing manual entering in cells with formulas

    Anyone know why the code provided by Logit doesn't work with an Array formula? Or any idea how to adjust the code to work with an array formula??

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,158

    Re: Allowing manual entering in cells with formulas

    .
    There must be something else going on with your workbook. I just tried using an Array formula here and it works.

    ???

+ 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] Allowing Users to Input Data into Cells Containing Formulas without Deleting the Formula
    By MayBTheresHope in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 10-29-2018, 07:43 PM
  2. Replies: 5
    Last Post: 04-04-2018, 02:57 AM
  3. Problem with entering formulas in data validation cells
    By ianpwilliams in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-12-2013, 05:10 PM
  4. Allowing manual entry into a cell but maintain cell formulas
    By Cipher Coder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2013, 04:50 PM
  5. Entering data into a Master and allowing it to follow on the corresponding tab.
    By psutter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-28-2011, 04:56 PM
  6. Cell with VLOOKUP allowing manual text entry aswell?
    By steve_l in forum Excel General
    Replies: 1
    Last Post: 11-22-2011, 07:12 AM
  7. vlookup using vba while allowing manual changes
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2006, 03:45 AM

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