If false do nothing

  • I have a table with data for last quarter

    Months Value

    Oct-20 10

    Nov-20 20

    Dec-20 18


    Another table with historic data that I want to grow:


    Months Value

    Jan-20 10

    Feb-20 18

    :

    :

    Oct-20 ---

    Nov-20 ---

    Dec-20 ----


    Every quarter I want to be able to fill the Value for the months of the quarter from the first table using Vlookup. However I don't want to disturb the values for the previous month. Can I write any formula or macro that would leave the older set undisturbed but add the values for the last quarter

  • If I am not mistaken ...


    You have just created a new thread with exactly the same question ...


    By the way ... feel free to attach a sample worbook ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • Hello,


    Starting in cell E13 and to be copied down :


    Code
    1. =IFERROR(LOOKUP(DATEDIF(A13,$A$1,"m"),{12,0,12},{"Future","Current","Old"}),"")


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • Thank you Carim, I have worked that out for column E


    My query is how can I populate values in column B, C and D of second table from the first table if the corresponding months match - but DO Nothing if the months' don't match. So a way to retain the historic value.


    Many many Thanks

  • Sorry read your message too quickly ... :S


    Will take a look at how ' to retain the historic value ' ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • Need some clarification ...


    When you say " populate values in column B, C and D of second table from the first table if the corresponding months match "


    Am wondering if instead of working with a ' Copy Quarter ' ... you should not work with a ' Copy Month ' instead ...


    It all depends on your exact working process ...;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • this is a complete joy - how can i see and copy the code please ?

    Pleased to hear this is in line with your expectations ...:)


    To copy code:

    1. Place your mouse pointer on the 'Charts' tab name

    2. Right-Click to open sub-menu

    3. Select View Code ( fifth choice)


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • Thank you.


    I prefer your first version, of clicking the button.


    One small tweek if you can please. I want to be able to create monthly report from the same chart - so say I only add the data for Oct-20. In that case

    A2 and A3 will be blank

    A7 and A8 will have Jan-00 as a date


    Can you create a logic that if A7 and A8 are Jan-00 then they dont get appended on table 2 please

  • Thank you Carim


    I feel like I am becoming rather demanding now. I am sorry


    I need to roll this out for the wider team to use so need it to be as simple as possible.


    I noticed you have used the if logic to remove Jan-00 from cells A8 and A9.


    Is it atall possible to just have one button Copy quarter which would copy 3 months in table 2 if there is data in a8 and a9, but only copy 1 month if a8 and a9 are blank.


    I will always be grateful

  • Attached is your version 4 test file ...


    Have added a condition ... to avoid the same month to be copied several times ...


    Hope this will help

    :)

    Files

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)