+ Reply to Thread
Results 1 to 7 of 7

How to change cells based upon a another cell

  1. #1
    Registered User
    Join Date
    09-24-2021
    Location
    Maryland
    MS-Off Ver
    Excel 2019
    Posts
    11

    How to change cells based upon a another cell

    .......................................
    Last edited by knopp; 09-27-2021 at 08:28 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: How to change selected cells based upon a changing date

    Attach a sample Excel workbook, rather than a picture of one, by following the guidelines in the yellow banner at the top of the screen.

    Pete

  3. #3
    Registered User
    Join Date
    09-24-2021
    Location
    Maryland
    MS-Off Ver
    Excel 2019
    Posts
    11

    Re: How to change selected cells based upon a changing date

    My apologies, I have attached one now.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: How to change selected cells based upon a changing date

    I'm not sure about the numbers (through the formulae) that you have in AE3 to AG3 - I think this formula in AE3:

    =SUMIFS($G$3:$AD$3,$G$2:$AD$2,">="&DATE(AE$2,1,1),$G$2:$AD$2,"<="&DATE(AE$2,12,31))*80

    which can also be copied across into AF3:AG3, will give you a more accurate figure for each year of your table. I'll look at the other formulae after I've had confirmation from you.

    Hope this helps.

    Pete

  5. #5
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: How to change selected cells based upon a changing date

    Your sum can just be a sumproduct along the lines of =SUMPRODUCT((YEAR($G$2:$AD$2)=AE$2)*($G3:$AD3))*80

    h2 is better as =EDATE(G2,1)

  6. #6
    Registered User
    Join Date
    09-24-2021
    Location
    Maryland
    MS-Off Ver
    Excel 2019
    Posts
    11

    Re: How to change selected cells based upon a changing date

    Hi Pete,

    Thank you for catching that error. I had not changed the cells in AE3 to match the dates and the formula there was incorrect. Thank you very much for this formula, it works great.

    Thanks,
    Rachel

  7. #7
    Registered User
    Join Date
    09-24-2021
    Location
    Maryland
    MS-Off Ver
    Excel 2019
    Posts
    11

    Re: How to change selected cells based upon a changing date

    Hi,

    Thank you very much for this formula, it works great.

    Thanks,
    Rachel

+ 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. HOW to change the color button based on changing any of the cells value
    By MOHAMED121212 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-15-2020, 04:44 PM
  2. HOW to change the color button based on changing any of the cells value
    By MOHAMED121212 in forum F1 Get the Most out of Excel! The Ultimate Excel Tip Help Guide
    Replies: 0
    Last Post: 11-15-2020, 09:48 AM
  3. Macro to Change Dates in selected cells from Number to Short Date Format
    By sebi171 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2020, 11:32 AM
  4. [SOLVED] Changing the colour of selected cells based on a single value
    By gpktm in forum Excel General
    Replies: 5
    Last Post: 02-26-2017, 11:04 PM
  5. [SOLVED] Changing cells based on a date changing
    By c.drysdale89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-24-2016, 07:32 AM
  6. Code to change color and value in calendar cells based on selected dates
    By John74 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2010, 02:01 PM
  7. Change a row of headings based on other selected cells
    By jjh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2006, 09:39 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