+ Reply to Thread
Results 1 to 11 of 11

[Solved] How to type any value in a cell without interrupting its formula

  1. #1
    Registered User
    Join Date
    04-05-2015
    Location
    israel
    MS-Off Ver
    2013
    Posts
    5

    [Solved] How to type any value in a cell without interrupting its formula

    Hey guys, is it possible:

    The value in A1 minus A2 equal A1.

    A1-A2=A1

    let me explain:

    i want to type any value (variable and not fixed) in A1 cell, so when i type it, the final result in A1 wiil be the value i typed, minus the value in A2. for ex.:

    typing in A1 value 100
    A2 value is 99
    100-99=1
    A1=1

    Generaly speaking, all i want is to type any value in A1 without interrupting its formula. is it possible?

    tnx
    Last edited by gentlegiant; 04-06-2015 at 07:28 AM.

  2. #2
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Re: Problematic "formula"

    iiiiiiii'm not entirely sure what the point is. Maybe some more context as to why you want to do this?

    You are essentially editing a cell but after you click enter you want that cell to change. That sounds like a macro to me.

    "The value in A1 minus A2 equals A1" sounds like a circular reference, which is a bad mistake in a document.

    For example, you type A1 = 100, A2 = 99, A3 = (=A1-A2) which is 1.
    Now let's say somehow A1 became 1, the formula would suddenly be (=1-99), which is -98
    Which would then be (=98-99) which is 197
    (=197-99)... and so on-- do you see where I'm going with this?

    The excel document will tell you you're doing something wrong

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,883

    Re: Problematic "formula"

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    04-05-2015
    Location
    israel
    MS-Off Ver
    2013
    Posts
    5

    Re: Problematic "formula"

    My bad, changed the title.

    RedSummer, speaking mathematically, there is nonsense in what i trying to do.
    I surely could do A3-A2=A1
    what i trying to do is to jump over A3.

    lets say you want to know how much you spend money on tax.
    A1 is tax
    A2 is food
    A3 is total food + tax

    there is no problem: A3-A2=A1 (total-food=tax)

    but what i trying to get is that the value i typing in A1 is the total, like A3, but without giving it a cell. the value i typing is variable and not defined somewhere in the document.

    lets say you spend total 1000. this is the value you typing in A1.
    you definitely know that you spent on food 700. its A2.
    now you want to know how much you spent on tax. which is A1.

    you type in A1 the value: 1000
    and after you press "enter" the value becomes 300, which is 1000-700 = the money you spent on tax.

    so generally, what i trying to get in A1 is: some value - A2 = A1


  5. #5
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Re: How to type any value in a cell without interrupting its formula

    Yeah this is too complicated for me
    From my understanding as soon as you press enter, your value is what you entered, it removes any formula
    What you want is a VBA code that will test different options on the sheet. I can't help with that, I'm sorry-- best of luck!

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,883

    Re: How to type any value in a cell without interrupting its formula

    Here is a VBA solution that will work for the scenario you have described where the value of A2 = 700. Enter the total spend in A1 and it will automatically adjust.

    Place the code as follows.

    Open the VBE (Alt F11)
    click on the worksheet in the left window. In the right window, paste the code below.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by alansidman; 04-05-2015 at 06:50 PM.

  7. #7
    Registered User
    Join Date
    04-05-2015
    Location
    israel
    MS-Off Ver
    2013
    Posts
    5

    Re: How to type any value in a cell without interrupting its formula

    wow tnx alan work perfect. how can i apply this to multiple cells?
    lets say i want this rule to work also in B1 & B2, C1 & C2 and etc...??

    generally i want it to work from b9 & b10 till n9 & n10

    thanks!
    Last edited by gentlegiant; 04-05-2015 at 07:26 PM.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to type any value in a cell without interrupting its formula

    Generaly speaking, all i want is to type any value in A1 without interrupting its formula. is it possible?
    Short answer - no, not with regular formulas. A cell can contains data (numbers/text)or a formula, not both
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Registered User
    Join Date
    04-05-2015
    Location
    israel
    MS-Off Ver
    2013
    Posts
    5

    Re: How to type any value in a cell without interrupting its formula

    thanks. alans solution workd for me.

    thanks alan works perfect. how can i apply this to multiple cells?
    lets say i want this rule to work also in B1 & B2, C1 & C2 and etc...??

    generally i want it to work from b9 & b10 till n9 & n10

    thanks!

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How to type any value in a cell without interrupting its formula

    Please Login or Register  to view this content.
    Should do it.
    Remember what the dormouse said
    Feed your head

  11. #11
    Registered User
    Join Date
    04-05-2015
    Location
    israel
    MS-Off Ver
    2013
    Posts
    5

    Re: How to type any value in a cell without interrupting its formula

    much of thanks!

+ 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 short my formula which is ="("&a1&","&a2&","&a3&","&a4&" end in "&a200&")
    By vengatvj in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-07-2013, 07:49 PM
  3. [SOLVED] Formula needed to display "Pass" or "Fail" if a column contains any values other than "yes
    By andreindy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2013, 05:49 PM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. [SOLVED] If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 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