+ Reply to Thread
Results 1 to 16 of 16

How to deal with manual entry and formula Simultaneously in a single cell ?

  1. #1
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    How to deal with manual entry and formula Simultaneously in a single cell ?

    Hi Friends !
    I put two problems facing while working in excel 2007.

    [1] Sometimes I use a cell with formula as well as manual entry.e.g. I use B1 with today() function and when I need another date, I enter manual date and the formula, evidently, disappears.I don't know if It is possible when we make manual entry ,the cell will take that entry and when delete the entry, the cell will take value from formula.Presently, I use two cells for this. e.g. B1 take value from formula ( today() ) when A1 is empty.If I enter manual date in A1 , the B1 will take value form it and the formula will not wipe out.
    Is it possible to use only single cell this way ?

    [2] Can I lock particular cell by formula or UDF ?

    I have always got the perfect solution from the masters of Excel-community. So thanks in advance.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Do you mean this ..

    in B1 =IF(A1="",TODAY(),A1)

    ???

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Answers to [1] You can not have a formula AND manual entry in the same cell, it can only be one or the other.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Hi Vimal,

    If you have a worksheet function (like Sum or VLookup) in a cell you can't simply go into that cell and type a value over it. The value (like 10 or 55) will replace the formula/function in that cell.

    I'd suggest you use some VBA to put today's date in the cell. By using VBA you aren't keeping a function in the cell.

    Here is the code and attached example:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,344

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Not with a formula, and not with a UDF. However, you can probably do it with a Worksheet Change event handler PLUS a Worksheet Selection Change event handler.

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Thank you friends, thanks all of you,

    Now I will go for options one by one,guided by you, and will see what happen

    Thanks for sharing my problem

  7. #7
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Thanks ,friends, my job has done,special thanks to MarvinP

    One question to TMS as curiosity
    I appreciate ,if you can spare some time to drop few lines how to use event handler you mentioned in Excel file
    for I am not much familiar with VB.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    VBA code is often used within a macro that is activated when you push a virtual button or start it from the macros window. You can also have the code activated by a particular event (such as changing a value, double clicking on a cell, or activating a worksheet). To see these options, right click on the spreadsheet tab, >View Code. This will open up the VBA editor and you'll be inside the Worksheet module. Change the dropdown menu that currently says "General" to "Worksheet" The dropdown menu to the right has a number of "events" that you can choose to trigger your VBA code. That is an event driven macro or event handler code. Hope that helps.
    Attached Images Attached Images
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  9. #9
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Thanks ChemistB !
    You deliver a great tips. I learn a lot more regarding use of codes in excel
    Thanks again

  10. #10
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    My second Point "Can I lock particular cell by formula or UDF ?"
    If anyone have reply, pls let me know.

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    If you are asking if you can lock a cell that has a formula or UDF in it so that no one can type over it (or change it), then yes.

    If you are asking if you can, without locking the cells, alllow only formulas or UDF's into a cell, then I think that would require VBA.

    WHich are you asking?

  12. #12
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    I put the question as example.

    Say A1 is not locked ( and sheet is not protected)
    If B2 has "one type" value,the A1 required data from user and A1 should not be locked
    if B2 has "second type" value, the A1 required nothing and must be locked and if data entered in it by mistake, it spoils another linked sheets.
    So how to lock and unlock A1 without protecting sheet ?

  13. #13
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Let's say if B2 says "auto" then we want A1 to lockup.

    Using Data Validation on A1, Custom>
    Formula: =$B$2<>"auto"
    However, they can change A1 before B2 becomes "auto" or
    they can copy and paste into A1 which bypassees the data validation

  14. #14
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    It's certainly useful.But can I lock ( or unlock ) cell without protecting sheet? By VBA or else, just as we lock the cell when sheet is protected.

  15. #15
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Not sure what you are asking. See this example. A1 is locked unless B1 reads "manual"
    Unfortunately Copy and Paste will screw up everything but Excel wasn't made to work this way.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    08-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to deal with manual entry and formula Simultaneously in a single cell ?

    Thanks ChemistB and all !
    I think I will do the job with formule and data validation as you rendered.I think you are right,the excel can't do things for which it is not made.
    I think my problem is slolved

+ 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. Formula or User Entry in single cell?
    By bartonkj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-01-2015, 03:31 PM
  2. Manual Entry without deleting formula
    By gzoeller in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2015, 08:44 AM
  3. [SOLVED] Allowing manual entry into cell which has formula while keeping th formula
    By Bobz1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2014, 12:12 AM
  4. Replies: 1
    Last Post: 02-22-2011, 05:16 AM
  5. Difficulty with manual entry/formula in the same cell
    By dolphinstardust in forum Excel General
    Replies: 7
    Last Post: 02-10-2011, 04:19 PM
  6. Replies: 1
    Last Post: 01-23-2007, 02:33 PM
  7. Manual or Formula entry in cell.
    By Naz in forum Excel General
    Replies: 0
    Last Post: 05-24-2005, 06:06 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