+ Reply to Thread
Results 1 to 11 of 11

Formula help - a "today's date" formula?

  1. #1
    Registered User
    Join Date
    04-18-2018
    Location
    NY
    MS-Off Ver
    office 365
    Posts
    9

    Formula help - a "today's date" formula?

    Hello

    I need help with some formulas for 3 columns on my spreadsheet. I need a formula that changes red when the date inside it is 3 years older than todayís date, but stays green when not. It also needs to change red when there is no date. When I say today, I mean when I open it on the February 23rd thatís ďtoday'sĒ date, or if I open it on March 12th, thatís today's date, etc.

    I am pretty new to Excel and see all the really awesome things you can do with it, itís just sometimes I donít know how to do it. I tried looking up a formula using today() and IF but I am not sure how to put the formula(s) together. I also need one that changes at the one year mark, but I figure I can just change the number in the formula for the one above?

    The person who created it applied conditional formatting, but I think you have to keep changing dates, some are listed two or three times, or are partial, or not needed anymore, etc.... It is just a mess. I figure there has to be a better way with a few formulas, rather than having almost 30+ different (no exaggeration) conditional formats. Any help would be great, and if you need clarification on anything just let me know. THANK YOU!

    Excel question picture.docx

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,596

    Re: Formula help - a "today's date" formula?

    go to conditional formatting, click on new rule, go to use a formula to determine which cells to format, then use this formula =DATEDIF(A2,TODAY(),"y")>=3 then click on format and format either the font or the fill or what you want if the condition is met.
    (assuming your date is in A2, adjust it to your cell location).
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    5,959

    Re: Formula help - a "today's date" formula?

    Hello and welcome to the forum. You would be better off attaching a sample Excel workbook than a picture of it inside of a Word document.

    That being said, you can use two Conditional Formatting formulas (one for each color) to give you the result that you are looking for.

    Let's say that the cells that you want to apply the Conditional Formatting to are A2:A1000 and that you want to fill the cells red when the date is at least 3 years old (or blank) and green when the date is less than 3 years old.

    Highlight A2:A1000 > Conditional Formatting > New Rule > Use a formula
    =A2<=EDATE(TODAY(),36)
    Format: Fill red > OK > OK

    Highlight A2:A1000 > Conditional Formatting > New Rule > Use a formula
    =A2>EDATE(TODAY(),36)
    Format: Fill green > OK > OK

  4. #4
    Registered User
    Join Date
    04-18-2018
    Location
    NY
    MS-Off Ver
    office 365
    Posts
    9

    Re: Formula help - a "today's date" formula?

    I'm sorry, I'm not sure how to attach a sample. Hopefully this is it.
    Attached Files Attached Files

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,596

    Re: Formula help - a "today's date" formula?

    ok, so here is what I did.
    removed your conditional formatting already applied, to do this go to conditional formatting, click clear rules and remove from entire sheet.
    now if you want a base as green set up the green (or whatever color you want) to the cells you want, then do the conditional formatting for the sheet in the areas you want.
    so conditional formatting for cell B8 I used is =DATEDIF(B8,TODAY(),"y")>=3 and applied as red fill.
    CF I used for E8 is =OR(E8="",E8>1)
    CF for F8 is =DATEDIF(F8,TODAY(),"y")>=1
    CF for G8 is the same =DATEDIF(G8,TODAY(),"y")>=1

    here is your sheet with the changes.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-18-2018
    Location
    NY
    MS-Off Ver
    office 365
    Posts
    9

    Re: Formula help - a "today's date" formula?

    OMG...perfect! Thank you so much for your help!!.

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,596

    Re: Formula help - a "today's date" formula?

    You're welcome! And thank you for the rep!

  8. #8
    Registered User
    Join Date
    04-18-2018
    Location
    NY
    MS-Off Ver
    office 365
    Posts
    9

    Re: Formula help - a "today's date" formula?

    One more question. Can i also apply this to google sheets as well?

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,596

    Re: Formula help - a "today's date" formula?

    Sorry, I have no experience using google sheets so I don't know. Perhaps someone else will stop by who does.

  10. #10
    Registered User
    Join Date
    04-18-2018
    Location
    NY
    MS-Off Ver
    office 365
    Posts
    9

    Re: Formula help - a "today's date" formula?

    No problem, thank you for all your help!

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,596

    Re: Formula help - a "today's date" formula?

    sure, no problem. there is a section on the main forum for other platforms and they do have google info there, maybe that will help you.

+ 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] Array formula help: "Who is working today?"
    By Eiden in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-06-2017, 07:48 PM
  2. If Sheet("Entry").range("P3") has not today date then run macro
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-20-2016, 12:13 PM
  3. [SOLVED] Formula or function to populate a range of cells based on "TODAY()"?
    By Bonzopookie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-29-2014, 05:59 PM
  4. Replies: 4
    Last Post: 09-20-2014, 07:10 AM
  5. [SOLVED] Having trouble with "=Today()" formula in macro
    By Jiptastic in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-04-2013, 12:36 PM
  6. condit. format: If date in cell = today, display "Today"
    By ratkins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2013, 01:33 PM
  7. Formula: How to write.."if A2 is blank then b2=today's date?
    By wheresleo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2005, 07:05 AM

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

X vBulletin 4.1.8 Debug Information

  • Page Generation 0.07385 seconds
  • Memory Usage 9,174KB
  • Queries Executed 16 (?)
More Information
Template Usage (34):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (11)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (4)navbar_noticebit
  • (6)option
  • (2)postbit_attachment
  • (11)postbit_legacy
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (4)showthread_bookmarksite
  • (7)showthread_similarthreadbit
  • (1)showthread_similarthreads
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper
  • (1)vbseo_linkbackmenu_entry 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (39):
  • ./vbseo.php
  • ./env.php
  • ./vbseo/includes/functions_vbseo.php
  • ./vbseo/includes/functions_vbseo_pre.php
  • ./vbseo/includes/functions_vbseo_url.php
  • ./vbseo/includes/functions_vbseo_createurl.php
  • ./vbseo/includes/functions_vbseo_db.php
  • ./vbseo/includes/functions_vbseo_vb.php
  • ./vbseo/includes/functions_vbseo_seo.php
  • ./vbseo/includes/functions_vbseo_misc.php
  • ./vbseo/includes/functions_vbseo_crr.php
  • ./vbseo/includes/functions_vbseo_cache.php
  • ./vbseo/includes/functions_vbseo_hook.php
  • ./vbseo/includes/functions_vbseo_startup.php
  • ./includes/config.php
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/functions.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/functions_cforum.php
  • ./includes/functions_facebook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php
  • ./includes/functions_notice.php 

Hooks Called (50):
  • init_startup
  • friendlyurl_resolve_class
  • database_pre_fetch_array
  • database_post_fetch_array
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • fetch_musername
  • cache_templates
  • template_register_var
  • parse_templates
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • postbit_attachment
  • tag_fetchbit
  • tag_fetchbit_complete
  • showthread_similarthread_query
  • showthread_similarthreadbit
  • forumrules
  • showthread_bookmarkbit
  • navbits
  • navbits_complete
  • showthread_complete


Search Engine Friendly URLs by vBSEO 3.6.0 RC 1