+ Reply to Thread
Results 1 to 6 of 6

Determining Cost Period based upon number of Tags in a 6 Month Range

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Pennsylvania, United States
    MS-Off Ver
    Excel 2012
    Posts
    7

    Determining Cost Period based upon number of Tags in a 6 Month Range

    See the attached spreadsheet. Book1.xlsx. I am using Excel 2010 and have data in 5 columns Tag, Part, Date, Qty, and Cost. In a separate column I need to Compute a bill based upon the following logic:

    If less than 3 tags have been filed for a particular part number during any 6 month time period then now additional bill is needed.

    An additional cost needs to be calculated for any period of time that tags were filed for a particular part at a rate of 3 or more tags every 6 months. Once this cost period has been established, the additional cost calculation is as follows:

    The additional cost will be the lesser of $1000 or Qty*Cost*25% over each separate cost period.

    I am at a loss as to how to start making this calculation and any help would be awesome.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Determining Cost Period based upon number of Tags in a 6 Month Range

    Hi,

    Does the attached get you started?

    I must admit I don't fully understand the second part to your request but this will identify the number of part #s in a 6 month period.

    If you want to manually add the results you expect describing how you arrive at them we can perhaps help further.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-27-2012
    Location
    Pennsylvania, United States
    MS-Off Ver
    Excel 2012
    Posts
    7

    Re: Determining Cost Period based upon number of Tags in a 6 Month Range

    After looking at your method Richard, it doesn't appear that I was clear in what I was asking. I will focus only on the first part of my request counting the number of tags in a 6 month window (I have approximated 6 months to be 180 days).

    I need to count how many tags were issued on a single part number looking back in a six month window from the date listed on a Tag. For example Tag B87343 is dated 30-Oct-02, looking back to 3-May-02 there is only 1 tag for the part number 17AB123XX so I want a 1 to be returned. For Tag W04069 dated 4-Nov-04, looking back to 8-May-04 there are 5 Tags that were issued for part number 12AB123XX. I have included a spreadsheet with some manually entered output in column H. Book1(2).xlsx.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Determining Cost Period based upon number of Tags in a 6 Month Range

    Hi,

    OK, in H2 copied down

    =COUNTIFS($C$1:$C$197,">="&G2,$C$1:$C$197,"<="&C2,$B$1:$B$197,B2)

  5. #5
    Registered User
    Join Date
    08-27-2012
    Location
    Pennsylvania, United States
    MS-Off Ver
    Excel 2012
    Posts
    7

    Re: Determining Cost Period based upon number of Tags in a 6 Month Range

    Thanks Richard that worked great.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Determining Cost Period based upon number of Tags in a 6 Month Range

    ..and I guess you'd already spotted it but I should have mentioned that the data needs sorting first by Part & Tag for this method to work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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