+ Reply to Thread
Results 1 to 3 of 3

cell equals 0, changes when condition met, leave unchanged when condiiton false

  1. #1
    Registered User
    Join Date
    03-24-2014
    Location
    Roswell, GA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question cell equals 0, changes when condition met, leave unchanged when condiiton false

    I am trying to perform a calculation in a cell that leaves the value 0 if before Feb 2014, changes to the value of another cell in Feb 2014 and leaves the value unchanged if after Feb 2014. I can get to the Feb 2014 value but after that month the value changes to 0. Am I missing a simple solution?

    The Cell formula that I am trying to use is as follows:
    =IF(YEAR($A$3)<2014,"0",(IF(YEAR($A$3)>2014,H114,(IF(MONTH($A$3)<>2,H114,AA118)))))

    A3 contains TODAY()
    H114 is the cell being calculated
    AA118 is the cell containing the calculated value for the current month.

  2. #2
    Registered User
    Join Date
    01-03-2011
    Location
    Vermont
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: cell equals 0, changes when condition met, leave unchanged when condiiton false

    I'm not sure what you're trying for, but the formula you have does what you're telling it to do.

    I put your formula in cell C3, and a date in A3. If $A$3 is prior to 2014, the C3 is "0". If the date is 2014 with a month of February, the C3 is whatever is in AA118. If the month is anything else (with a year of 2014), it is whatever is in H114.

    What are you trying to put in H114, and AA118?

  3. #3
    Registered User
    Join Date
    03-24-2014
    Location
    Roswell, GA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: cell equals 0, changes when condition met, leave unchanged when condiiton false

    Thanks Skeeter: Seems like I perhaps had improperly created test data. As I recreated the formula by placing it in a3, put a date in a1 and a number in a2, the resultant 0 or the a2 number was correctly shown in a3.
    Sorry for the post but everytime I tested the formula it replaced the correct montly with a 0 after the next month. I have now entered it in the live sheet and hope that the March number remains in April.
    Thanks again for looking at this one and making me test it more carefully.

+ 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: 11-28-2013, 02:16 AM
  2. IF function, remain the existing information unchanged when statement is false
    By Adamlearnexcel in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-11-2012, 11:40 PM
  3. How to leave value alone if condition is false?
    By dgarris in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-20-2012, 08:13 PM
  4. [SOLVED] Cell Equals Anything But FALSE
    By artiststevens in forum Excel General
    Replies: 5
    Last Post: 05-13-2012, 02:19 AM
  5. [SOLVED] how do I leave cell content unchanged if a condition is not met
    By darkelf26 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2006, 12:45 PM

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