+ Reply to Thread
Results 1 to 7 of 7

Calculate forumla once

  1. #1
    Registered User
    Join Date
    01-27-2020
    Location
    england
    MS-Off Ver
    office 365, excel version 1912
    Posts
    53

    Calculate forumla once

    Hi is there any way to make a forumala only calculate once.

    Cell A1 is updated via live data every 2 minutes.
    If cell A1 is between numbers 1 and 5 i would like the value of C1 to be entered into B1

    I have in B1 the formula =IF(AND(A1>=1,A1<=5),C1,0)

    Hope someone can help.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Calculate forumla once

    A simple macro would do that for you.

    Is that permitted?


    Right Click on the sheet name at the bottom of Excel and Select View Code.

    Paste this code into the module that opens.

    Close the module.

    Please Login or Register  to view this content.
    The code can be reduced to


    Please Login or Register  to view this content.
    Last edited by mehmetcik; 02-21-2020 at 09:45 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,336

    Re: Calculate forumla once

    I guess it is, as the OP has posted in the VBA section ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    01-27-2020
    Location
    england
    MS-Off Ver
    office 365, excel version 1912
    Posts
    53

    Re: Calculate forumla once

    Hi thanks alot that works great, iv tried changing the code for different cells but i dont totally understand the code,
    could you show me the code for other cells ?

    Cell AJ1 is updated via live data every 2 minutes.
    If cell AJ is between numbers 1 and 5 i would like the value of o5 to be entered into i5

    I have in ai5 the formula =IF(AND(Aj1>=1,Aj1<=5),o5,0)

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Calculate forumla once

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-27-2020
    Location
    england
    MS-Off Ver
    office 365, excel version 1912
    Posts
    53

    Re: Calculate forumla once

    hi the 1st code works, formula only calculates once
    but the 2nd code for AJ1 the formula calculates over and over.
    maybe im doing something wrong

  7. #7
    Registered User
    Join Date
    01-27-2020
    Location
    england
    MS-Off Ver
    office 365, excel version 1912
    Posts
    53

    Re: Calculate forumla once

    hi that code works fine, thanks alot for helping,

+ 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: 3
    Last Post: 03-16-2015, 05:34 AM
  2. [SOLVED] Forumla to calculate differences in dates
    By B3cky in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-14-2014, 12:42 PM
  3. Need Forumla to Re-Calculate when Date Changes for Close Month
    By CMPidgeon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-14-2013, 09:26 AM
  4. Require forumla to calculate age at date of termination
    By Stacey88 in forum Excel General
    Replies: 2
    Last Post: 06-29-2012, 04:12 AM
  5. Help with forumla to calculate daily targets
    By Climaxgp in forum Excel General
    Replies: 5
    Last Post: 04-09-2009, 08:57 AM
  6. Forumla to calculate a percentage
    By julie regan in forum Excel General
    Replies: 1
    Last Post: 01-20-2005, 05:06 PM
  7. Replacing a cell's forumla with the forumla's results?
    By Mooncalf in forum Excel General
    Replies: 2
    Last Post: 01-04-2005, 12:35 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