+ Reply to Thread
Results 1 to 13 of 13

If date changes in one cell, have text change in another.

  1. #1
    Registered User
    Join Date
    09-22-2014
    Location
    Utah
    MS-Off Ver
    2010, Office Suite
    Posts
    6

    If date changes in one cell, have text change in another.

    Hello!

    In cell G10, I have the =now() formula.

    Anytime the date changes from that =now() formula to the next day, I would like another cell to change (E44) to the next set of text located in a range on another worksheet ('Commitments'!A3:A17) - in sequential order, and then repeat as the days cycle through. There are 15 lines of text to be displayed, and then continuously repeated.

    So example:

    G10 = Sept. 22nd
    E44 = the text "this place is cool"

    When G10 changes to = Sept. 23rd, I'd like E44 to change to the next line of text in the range, "Life is to be lived."

    Range = ('Commitments'!A3:A17) =
    A3 = "this place is cool"
    A4 = "Life is to be lived."
    A5 = "Insert text here"
    All the way to A:17

    I am at a loss if there is an existing formula to do this or if I need to set up a Macro, at which I'm also lost. I am completely open to any and all thoughts you have on making this work. Thank you!

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: If date changes in one cell, have text change in another.

    One way to do this is to list your "quotes" starting in Sheet2!a1 down column A. This formula will take the quote that corresponds to the day of the month. This of course doesn't limit the quotes to A3 to A17.

    Enter this in E44

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 09-22-2014 at 02:08 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Registered User
    Join Date
    09-22-2014
    Location
    Utah
    MS-Off Ver
    2010, Office Suite
    Posts
    6

    Re: If date changes in one cell, have text change in another.

    This formula is great - however, I do not have a new quote for each day of the month. The list of quotes is only 15. I could jimmy rig it and just copy and paste the 15 over again. It'd be nice to have it set up to where it simply always puts in the next quote in sequential order, then repeats, after 15.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: If date changes in one cell, have text change in another.

    This appears to work if the quotes are on sheet2 A3:A17

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


    Oops, this goes to A19 (17 quotes)

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


    That should do it.
    Last edited by newdoverman; 09-22-2014 at 02:21 PM.

  5. #5
    Registered User
    Join Date
    09-22-2014
    Location
    Utah
    MS-Off Ver
    2010, Office Suite
    Posts
    6

    Re: If date changes in one cell, have text change in another.

    Thank you - it works with only a minor hiccup. The transition from Sept to Oct, for example - there are only 30 days in Sept, then it's skipping to Oct. 1st. It actually skips the 15th and 1st quote on the new sheet. It goes from the 14th quote on Sept. 30th and then the 2nd quote on Oct. 1st. Any thoughts?

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: If date changes in one cell, have text change in another.

    Are you using =INDIRECT("sheet2!A"&MOD(DAY(G10),15)+3) ?

    I can't reproduce your problem. I have cycled through the days of the month and get the proper results. The DAY function should pull the day of the month regardless of what month it is. Are the dates being entered properly?....just a guess.

    My test data is on sheet2 from A3:A17 inclusive.

  7. #7
    Registered User
    Join Date
    09-22-2014
    Location
    Utah
    MS-Off Ver
    2010, Office Suite
    Posts
    6

    Re: If date changes in one cell, have text change in another.

    We are settled! Thank you - I didn't see your edit - it now works. Much obliged, seņor.

  8. #8
    Registered User
    Join Date
    09-22-2014
    Location
    Utah
    MS-Off Ver
    2010, Office Suite
    Posts
    6

    Re: If date changes in one cell, have text change in another.

    Let's say, for example -- that I wanted to keep a quote on for 7 days, instead of having it change each new day.

    How would that dynamic change the formula?

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: If date changes in one cell, have text change in another.

    This is one way of solving the problem:
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-22-2014
    Location
    Utah
    MS-Off Ver
    2010, Office Suite
    Posts
    6

    Re: If date changes in one cell, have text change in another.

    Thank you! Works like a charm.

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: If date changes in one cell, have text change in another.

    Thanks for the feedback.

    There might be more elegant ways of doing this. The last value in the long list could be a repeat of the last quote or an addition of the first quote instead of quote 8.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If date changes in one cell, have text change in another.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  13. #13
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: If date changes in one cell, have text change in another.

    Here is a version that allows you to choose how many repeats to have.
    Attached Files Attached Files
    Last edited by newdoverman; 09-22-2014 at 06:17 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] Excel 2013: Change text in cell based on date in another cell
    By LisaJean in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2014, 08:22 AM
  2. Change date into text if <today and adding text if cell isblank... into an Array.
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2013, 12:06 PM
  3. [SOLVED] Want to change text in a cell on sheet2 if date changed in sheet3.
    By Kezza in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2006, 09:40 PM
  4. Change text to date and check against date in cell
    By RW in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2006, 11:30 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1