+ Reply to Thread
Results 1 to 3 of 3

Make a formula return values only once when a condition is met.

  1. #1
    Registered User
    Join Date
    05-01-2021
    Location
    San Diego
    MS-Off Ver
    365
    Posts
    3

    Make a formula return values only once when a condition is met.

    Hi everyone,

    Is it possible to configure an IF formula that if it has ONCE met the preferred condition as in say date in A1 = date in A2 then the formula to run ONLY ONCE, and if not then leave the cell empty? What I want to do is to have excel run the formula in a cell that meets two conditions: A) cell is empty and B) meets date A1 = date A2 rule. OK, this is easy enough. However,

    Our fixed date values are in A2....An. But, date value in A1 is changed via a filter (i.e slicer). Also our formulas are in B2....XY2, B3....XY3... B5....XY5, so on and so forth. Assume A1 states May 1, and A2 also states May 1. What I am after is twofold: A) If B2..Bn row is empty and A1=A2 then go fetch me this value from Table X. B) However, if the cell is already full (assume now that we have changed the A1 filter from May 1 to May 2 [A1=A3] ), then do nothing for all other rows except B3...Bn, along with the caveat that it also doesn't change the values previously fetched for B2...Bn. So if the formula checks the cell is already full (or in essence has been filled once) it returns with I should not run me (again).

    In layman terms, "Is there any way to embed the result of a formula evaluation in a cell, such that the evaluation only happens once?"

    Many thanks.
    Last edited by alphahotel; 05-01-2021 at 04:40 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Make a formula return values only once when a condition is met.

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

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

    Re: Make a formula return values only once when a condition is met.

    Hi alphahotel,

    It sounds like you really need a filter instead of a formula. In imagining a formula that might do this leads me to a circular ref in that cell.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say 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. [SOLVED] Formula to look into table and return values if condition is met
    By bjnockle in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-22-2020, 08:24 AM
  2. Replies: 7
    Last Post: 11-15-2019, 04:30 PM
  3. Replies: 3
    Last Post: 08-07-2018, 10:14 AM
  4. [SOLVED] Make all values of rows static if condition met
    By alice2011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-03-2015, 11:38 AM
  5. Return values if more than 1 condition are met
    By jleblanc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2014, 10:12 AM
  6. Store cell values in an array and return values on specific condition
    By gmalpani in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 11-27-2011, 06:43 AM
  7. Return Top Ten values when condition is met?
    By jarvo in forum Excel General
    Replies: 1
    Last Post: 02-17-2005, 11:28 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