+ Reply to Thread
Results 1 to 4 of 4

Matching value accoring to a date from an asymetric date range

  1. #1
    Registered User
    Join Date
    12-25-2020
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    2

    Matching value accoring to a date from an asymetric date range

    What I have is a table with tax rates.

    TAXTABLE.jpg

    Each date represents the day in which a new tax level has came into force . For example, on the 01/01/2020 a tax level of 36$ came into force and it replaced a tax level of 14 and it lasted till the 25/05/2020 when it change to a level of 25$ which is in force now.

    There is no any consistent pattern in the gaps between the dates nor in the levels of the tax.

    What I want to do is to create a range of dates with a step value of ONE DAY with a coresponding tax rate that was during this day. The first day sould be 01/01/2014 and the last is today (say 25/12/2020). Namely, some this like this (this is just a fragment, I need the whole table).

    TAXTABLE2.jpg

    Thanks!

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Matching value accoring to a date from an asymetric date range

    A spreadsheet maybe useful, as in the yellow banner

    There is no any consistent pattern in the gaps between the dates nor in the levels of the tax.
    It may be difficult for excel to do that as there is NO Pattern,
    BUT you could use a lookup, with ALL the dates and then the 1st table used as a reference
    Once dates filled you can copy > Paste Special > Value to keep the values and remove the reference table and formula if needed
    If as a lookup table then you only need the date of the change
    The sort ascending and then you can use a lookup/match with a 1 to find the nearest OR vlookup( TRUE) which will use the nearest lower
    Although If it uses your TABLE as a reference

    see sample
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Matching value accoring to a date from an asymetric date range

    In A2:
    =SEQUENCE(DATE(2020,12,31)-DATE(2014,1,1),,DATE(2014,1,1),1)

    create a lookuptable of dates (ascending) and tax rate. In B2, copied down:
    =VLOOKUP(A2,J:K,2,TRUE)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Matching value accoring to a date from an asymetric date range

    Solution 1.

    What you asked for.

    Enter your Dates in Column A and your Values in Column B. Sort smallest to Largest.

    01/01/2014 16
    22/03/2014 88
    01/03/2015 31
    08/08/2016 22
    05/09/2017 53
    01/01/2018 99
    06/02/2019 77
    01/03/2019 5
    08/07/2019 14
    01/01/2020 36
    25/05/2020 25


    Now in Cell D1 enter the formula =A1
    In Cell D2 enter the formula =D1+1
    In Cell E1 enter the formula =INDEX(B:B,MATCH(D1,A:A))
    Copy E1 and Paste in E2

    Copy D2:E2 and fill down to row 2337 until you get to todays date.

    01/01/2014 16
    02/01/2014 16
    03/01/2014 16
    04/01/2014 16
    05/01/2014 16
    06/01/2014 16
    07/01/2014 16
    08/01/2014 16
    09/01/2014 16
    10/01/2014 16

    '''''''''''''''''''''''''''''''''''

    18/03/2014 16 16
    19/03/2014 16 16
    20/03/2014 16 16
    21/03/2014 16 16
    22/03/2014 88 88
    23/03/2014 88 88
    24/03/2014 88 88
    25/03/2014 88 88
    26/03/2014 88 88

    *****************************************************************
    Solution 2
    As Solution 1 using a Macro

    Please Login or Register  to view this content.
    *****************************************************************
    Solution 3

    Enter a Date in A1 this formula will return your tax rate =LOOKUP(A1,{41640,41720,42064,42590,42983,43101,43502,43525,43654,43831,43976},{16,88,31,22,53,99,77,5,14,36,25})
    Last edited by mehmetcik; 12-25-2020 at 09:35 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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] Finding Dates Within Date Range (Based on Today's Date) Whilst Matching Name?
    By EduardStoo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-08-2019, 10:31 AM
  2. Replies: 4
    Last Post: 03-21-2018, 09:25 AM
  3. [SOLVED] Find rows matching on 3 columns - date range; dollar range; and A or B
    By strassbergere in forum Excel General
    Replies: 0
    Last Post: 06-28-2016, 08:21 PM
  4. Matching with a nearest date in a date range?
    By mrxlsx in forum Excel General
    Replies: 2
    Last Post: 05-05-2015, 01:23 PM
  5. Sum ifs - Based on Matching Date (exact date not range)
    By alyssakhan in forum Excel General
    Replies: 11
    Last Post: 06-03-2014, 03:35 PM
  6. Add date criteria matching order date and sales date
    By Luther.King in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2014, 10:09 AM
  7. Indexing and matching data from date range and matching
    By Rickomicko in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2013, 11:46 AM

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