+ Reply to Thread
Results 1 to 3 of 3

Year Formula Partially Works

  1. #1
    Registered User
    Join Date
    03-25-2024
    Location
    Manchester, Jamaica
    MS-Off Ver
    Office 365
    Posts
    1

    Year Formula Partially Works

    By default, the formula below (in cell C8) returns the current year.

    =IF(OR(C8="[Select Month]",C8=""),"",IF(D12=TEXT(TODAY(),"yyyy"),"",IF(D12<>"",D12,TEXT(TODAY(),"yyyy"))))

    1. It works OK for all the conditions EXCEPT one.

    2. If the value in cell C8 is equal to the value in cell D12, then cell C8 should not show a value, otherwise the value of cell D12 should be shown.

    3. However, When C8 = C12, the value is also shown C8, which should not be.


    Please help. Thanks.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Year Formula Partially Works

    Welcome to the Forum PeterGeeJA!

    This formula in C8 refers to itself which creates a circular reference. Are you doing that deliberately?

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    There is nothing in the formula to reflect this. Not sure why you expect that to happen.

    We need more context. We can't diagnose one particular little issue when we don't know what you want your formula do to. The circular reference is also confusing without more context. Can you provide the file that uses this and explain the entirety of what you want this formula to do? Here is the breakdown of you current logic:

    Please Login or Register  to view this content.
    By the way, instead of converting the year to text, you should be using a numeric value. Change all occurrences of
    TEXT(TODAY(),"yyyy")
    to
    YEAR(TODAY())

    What is in D12? That should be numeric too.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Year Formula Partially Works

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    I am providing the link because it's your first post.

    https://www.mrexcel.com/board/thread...works.1256210/

    And here: https://forums.excelguru.ca/threads/...y-works.11838/
    Last edited by AliGW; 03-25-2024 at 12:44 PM.

+ 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] Refresh code partially works
    By rogrand in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2021, 05:47 PM
  2. Macro only works partially, can't figure out why
    By trstew in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2016, 11:11 AM
  3. Replies: 1
    Last Post: 07-06-2016, 08:27 AM
  4. [SOLVED] If,and,match statement only partially works
    By johnstan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2016, 05:49 AM
  5. Numberformat macro partially works, color changes, dateformat not
    By gertassen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2015, 11:10 AM
  6. [SOLVED] Macro only partially works.
    By VectorW2 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-02-2014, 04:08 PM
  7. [SOLVED] Formula Partially Works, Please Help
    By Joe Gieder in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-02-2006, 06:15 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